自定义PopOver与模式边框 [英] Custom PopOver with pattern border

查看:274
本文介绍了自定义PopOver与模式边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图实现popover这样:

I'm trying to implement popover like that:

我花了很多时间尝试自定义 UIPopoverController UIPopoverBackgroundView 。根据我的理解,我的任务是不可能的公共API的popovers。
这是可能的:

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. 要使用具有固定角和可伸缩中心的小图像,在这种情况下,在一边。

  2. 用条纹填充边框,但在这种情况下,我没有圆角。我也有恼人的内部阴影:

  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]];

backgroundImageView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"airmail_pattern"]];

有没有其他方法来重用标准popover或者我只需要使用UIViewController来实现这个行为?

Is there any other way to reuse standard popover or I have to implement that behavior using just UIViewController?

干杯。

推荐答案

WEPopover似乎做你想做的。它有自定义的背景属性,我想可以用于这个目的。 (我还没有使用过)

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

这篇关于自定义PopOver与模式边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆