Now that viewDidUnload
and shouldAutorotateToInterfaceOrientation
have been deprecated with iOS 6, what should we replace them with in MonoTouch?
ViewDidUnload()
you can just remove. If you have code in there, you'll have to move it into ViewWillDisappear() and the counterpart into ViewWillAppear()
. Relevant talks from WWDC 2012 are episode 236 (The evolution of view controllers) and 200 (What's new in Cocoa Touch).
ShouldAutoRotateToInterfaceOrientation()
is replaced by SupportedInterfaceOrientations().
See here: http://dhilipsiva.com/2012/07/25/ios-6-ui-interface-orientation-shouldautorotatetointerfaceorientation-not-working.html
viewDidUnload
Both viewDidUnload
and viewWillUnload
are not called anymore by iOS6. Xamarin's release notes for MonoTouch 6 covers this as well as Apple documentation.
shouldAutorotateToInterfaceOrientation
Two new methods (in iOS6, available in MonoTouch) can be overridden to get the same result.
See Apple documentation for the shouldAutorotateToInterfaceOrientation
selector for more details.
Note that shouldAutorotateToInterfaceOrientation
is still called (it's deprecated and discouraged for future use, but still available if you support older version of iOS).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With