views:

100

answers:

1

Hi!

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 sharedApplication] 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.

A: 

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

Kendall Helmstetter Gelner
well, for example in Tweetie2, when tweetie want's to authorize a new account there is a popup, grey box with ActivityIndicator inside, my action sheet is behind that and can't be "touched". since I'm using delegate methods I tried using a loop in the method which creates the ActionSheet and inserted in it [[[UIApplication sharedApplication] keyWindow] bringSubviewToFront:actionSheet];but it didn't work. the popup stays in front of my ActionSheet :/I hope you get what I mean (my poor english :D)
Yllier
Tricky, perhaps you could also override addSubview on UIWindow and anything that is not your window, gets set as a subwindow of your window?
Kendall Helmstetter Gelner
or maybe a way to get all the views and then put mine on top of it?
Yllier
At the top you would fine the same UIView that is keyWindow.
Kendall Helmstetter Gelner