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...
精彩评论