I used to do exactly what you are describing - setup a modal view controller,
adjust the area to get rid of the nasty full-screen nature of it, and push
it, etc... Bad part of that is the triggering the ViewWillAppear and
ViewDidAppear events in the underlying view controller once the modal is
dismissed in IOS < 5.0.  In IOS 5.0 and above, IOS is smart enough to know
that you just pushed a modal and the underlying controller is "ok", in < 5.0
the underlying view controller is refreshed as if it just appeared - each
time you dismiss a modal.

Instead of that, I use a main navigation controller with a custom modal view
(that I can add content to) then push that, once it is nested into a full
screen UIView that has a semi-transparent background.  This gives a whole
lot more control and works better across versions and devices.  I found on
IOS 5 on an ipod the weird refreshing of the underlying view occured where
IOS5 on an ipad it did not - such inconsistent behavior makes porting
difficult if you rely on or use those events for rotation transitions or
whatever.

My decision to abandon modal UIViewController's came when I went to port
IOS5 ipad code to the iphone and found the will-appear and did-appear issue
- both running same IOS version but behaving differently, rather than
scattering conditionals in the code (first-appear boolean indicators vs.
not-first-appear), I just said "no more" to hacking modal controllers.

I'd be happy to share if you are interested, PM me.



--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Modal-Popup-in-IPAD-Application-tp4656203p4656262.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to