问题
I'm trying to implement popover like that:
I've spent quite a lot of time trying to customize UIPopoverController
and UIPopoverBackgroundView
. As I understand my task is impossible with public API for popovers.
It is possible:
- To use small image with fixed corners and stretchable center, in that case I'll have stretched stripes on the side. And also I'll have image "under" the arrow.
Fill border with stripes, but in that case I don't have rounded corners. I also have annoying inner shadow inside:
backgroundImageView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"airmail_pattern"]];
Is there any other way to reuse standard popover or I have to implement that behavior using just UIViewController?
Cheers.
回答1:
WEPopover seems to do what you want to do. It has custom background property, which I guess could be used for this purpose. (I haven't used this yet)
https://github.com/werner77/WEPopover
来源:https://stackoverflow.com/questions/11762832/custom-popover-with-pattern-border