I was aware of that. I am using Monotouch 5.0.2 and the delegate class does not implement it. The only way of doing it that I can see, is to derive from the controller.
Maybe someone from Xamarin can pitch in? Thanks! Jean -----Original Message----- From: René Ruppert [mailto:[email protected]] Sent: November-09-2011 4:28 PM To: 'Jean Lapointe'; 'René Ruppert'; 'Shawn Baker'; [email protected] Subject: AW: [MonoTouch] ShouldHideViewController not being called Note that preventing the master controller from hiding is available in iOS5 only. So you will need Monotouch 5 to make it happen, or use an alternative split view controller. http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UISpli tViewControllerDelegate_protocol/Reference/Reference.html René -----Ursprüngliche Nachricht----- Von: Jean Lapointe [mailto:[email protected]] Gesendet: Mittwoch, 9. November 2011 15:29 An: 'René Ruppert'; 'Shawn Baker'; [email protected] Betreff: RE: [MonoTouch] ShouldHideViewController not being called René, Sorry! Just bumped into implementing this in my own app, got same problem as Shawn. I wanted to try overriding ShouldHideViewController to my UISplitViewDelegate class like you recommanded and than I realized that UISplitViewControllerDelegate does not seems to implement the ShouldHideViewController interface( http://docs.go-mono.com/index.aspx?link=C%3AMonoTouch.UIKit.UISplitViewContr ollerDelegate ). Am I missing something obvious? Thanks Jean -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of René Ruppert Sent: October-28-2011 4:40 PM To: 'Shawn Baker'; [email protected] Subject: Re: [MonoTouch] ShouldHideViewController not being called The method ShouldHideViewController is part of the controller's delegate, not the controller itself. The UISplitViewController class has a "Delegate" property, if I remember correctly. Assign this a class that derives from UISplitViewControllerDelegate (or whatever it was called) and in there override ShouldHideViewController(), then it should work. Alternatively the UISplitViewController might have an event handler - usually, Monotouch always provides both ways. René -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Shawn Baker Gesendet: Freitag, 28. Oktober 2011 18:57 An: [email protected] Betreff: [MonoTouch] ShouldHideViewController not being called I've been testing some of the new SDK 5.0 features, and one of the simpler ones is the ability to show the master view in portrait mode in the UISplitViewController. This is done by handling the ShouldHideViewController event and returning false. I've created my own SplitViewController class, which is derived from UISplitViewController, and overridden the ShouldHideViewController method as follows: public override bool ShouldHideViewController(UISplitViewController svc, UIViewController viewController, UIInterfaceOrientation inOrientation) { return false; } However, this method doesn't get called unless I assign the weak delegate in the constructor: WeakDelegate = this; Is this the way it's supposed to work? I'm using Xcode 4.2, Mono 2.10.6, MonoTouch 5.0, MonoDevelop 2.8.1, and my project's Deployment Target is 5.0. -- View this message in context: http://monotouch.2284126.n4.nabble.com/ShouldHideViewController-not-being-ca lled-tp3948559p3948559.html Sent from the MonoTouch mailing list archive at Nabble.com. _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
