Hi René, Can you attach your sample project where this happens? This will save a bit of time since we don't have to recreate it from your description :)
Thanks, Rolf On Tue, Nov 22, 2011 at 2:07 PM, René Ruppert <[email protected]> wrote: > Hi, > > > > I’ve posted this on SO but I think it is too special to be discussed there, > so I’m trying it over here. > > > > I'm experiencing crashes when running my app on iOS5. The code constellation > I have: > > > > · UIViewController A has an event "InputEnded". > > · UIViewController B adds A's view as a subview and attaches to > InputEnded. > > · In InputEnded, B removes A's view from super view, removes the > event handlers, disposes A and sets it to NULL. > > > > In iOS 4.3 this works as expected, however A's ViewDidDisappear() is never > called, but that's okay and according to Apple’s docs. > > > > In iOS 5 however, A's ViewDidDisappear() DOES trigger. It gets fired some > point later in time. But the issue is: it fires even though A is already > disposed (Handle == 0) and hence it will crash! > > > > In both, A and B I override bool > AutomaticallyForwardAppearanceAndRotationMethodsToChildViewControllers and > return FALSE to keep the same behavior as I see in iOS 4.3 but appearently > it will always call its *own* ViewDidDisappear(), no matter what you return, > so there does not seem to be a way to get the 4.3 behavior back. My solution > is now to NOT dispose anymore and let GC do it but I don’t like that. > > > > Can somebody explain what is going on here and how to overcome it? > > > > René > > > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
