开发者

iPhone: finding the currently "highest" view

开发者 https://www.devze.com 2022-12-08 06:28 出处:网络
I\'m coding a MobileSubstrate plugin (a code insertion platform on jailbroken devices) which will hook into safari and a few other apps.

I'm coding a MobileSubstrate plugin (a code insertion platform on jailbroken devices) which will hook into safari and a few other apps.

This plugin will have to display an UIActionSheet. But in order to do that I need to find a view to display it in. so far I'm using showInView:[[UIApplication sh开发者_开发问答aredApplication] keyWindow] but it's not the perfect solution.

Is there any way to find the highest view? highest so UIActionSheet doesn't get covered by a view.

Thanks in advance.


keyWindow is the highest view. You could look through subviews of keyWindow, but in my experience they are unlikely to work well - the tab bar controller is a good example where no direct subview is really great to add a subview to.

What issues are you seeing with using the keywindow? The primary annoyance would be, that keywindow stuff is not rotated properly in landscape mode...

0

精彩评论

暂无评论...
验证码 换一张
取 消