Found it...

Seems if you push a view controller too quickly after showing an ActionSheet, 
the ActionSheet is the KeyWindow. I need a pause to allow the ActionSheet to 
disappear before I can push this new Window.

Dino

From: [email protected] 
[mailto:[email protected]] On Behalf Of Dean Cleaver
Sent: Thursday, August 30, 2012 12:03
To: [email protected]
Subject: [MonoTouch] Forcing rotate

Hi,

I found this code which will cause the device to query your view for 
orientation:

UIWindow window = UIApplication.SharedApplication.KeyWindow;
UIView view = window.Subviews[window.Subviews.Length - 1];
view.RemoveFromSuperview();
window.AddSubview(view);

Problem is - it works in one view, but not in another. In the second one, the 
window.Subviews is 0 length and I don't know why - everything else is pretty 
much identical. I'm pushing the new views from the same view, everything 
appears the same it's just one seems to make my KeyWindow have 0 Subviews.

Any ideas why?

Dino
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to