删除 UIPopoverController 的边框 [英] Remove border for UIPopoverController

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

问题描述

我有一个要求,我必须为 UIPopoverController 的弹出视图显示自定义边框,而不是默认的黑色主题"边框.有可能吗?

I have a requirement where in I have to display a custom border for UIPopoverController's popover view instead of the default "Black theme" border. Is it possible?

我不能使用默认的黑色边框,因为它不适合应用程序的颜色主题.

I cannot use the default black border because it doesnt suite the application's color theme.

SDK 中没有执行此操作的规定.我也用谷歌搜索了其他人是否遇到过这个问题以及他们是否已经解决了这个问题,但没有运气!

There is no provision in the SDK to do this. I have also googled to see if someone else have faced this problem and if they have solved it, but with no luck!

等待建议.

谢谢,拉杰

推荐答案

解决了这个问题,方法是使用 UIView 并覆盖主 rootViewController 视图中的 hitTest 以查看触摸点是否在该视图之外.如果是这样,将消耗该事件以关闭新的弹出框,否则该事件将被转发到新的弹出框.

Solved this by using UIView and also by overriding the hitTest in the main rootViewController's view to see if the touch point is outside that view. If so, the event will be consumed to dismiss the new popover, otherwise the event will be forwarded to the new popover.

这篇关于删除 UIPopoverController 的边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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