Custom PopOver with pattern border

妖精的绣舞 提交于 2019-12-22 11:09:49

问题


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:

  1. 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.
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!