How to use initWithNavigationBarClass with MonoTouch?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to use initWithNavigationBarClass with MonoTouch?

efontana
I'm trying to port an existing Objective-C class, but it uses initWithNavigationBarClass which somehow tells the UINavigationController to use the the custom NavigationBarClass rather than the stock one, which is exactly what I'm trying to do.  My problem is, I don't see any way to accomplish this with MonoTouch?  The UINavigationController has a read-only NavigationBar member, so I can't simply construct one?

How do I do this?

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use initWithNavigationBarClass with MonoTouch?

efontana
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use initWithNavigationBarClass with MonoTouch?

efontana
Tried this; no joy;

 public class CRNavigationController : UINavigationController
  {
    [Export("initWithNavigationBarClass:toolbarClass:")]
    public CRNavigationController(UIViewController vc) : base(vc)
    {
      CRNavigationBar nb = new CRNavigationBar();
      Handle = Messaging.intptr_objc_msgSend_intptr(this.Handle, Selector.GetHandle("initWithNavigationBarClass:toolbarClass:"), nb.Handle);
    }
  }
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use initWithNavigationBarClass with MonoTouch?

Sebastien Pouliot
In reply to this post by efontana
The `initWithNavigationBarClass` selector you're looking for is mapped with this constructor:

public UINavigationController (Type navigationBarType, Type toolbarType) 


On Sat, Oct 5, 2013 at 8:48 AM, efontana <[hidden email]> wrote:
BTW: this is what I'm trying to use;
http://stackoverflow.com/questions/18897485/achieving-bright-vivid-colors-for-an-ios-7-translucent-uinavigationbar




--
View this message in context: http://monotouch.2284126.n4.nabble.com/How-to-use-initWithNavigationBarClass-with-MonoTouch-tp4658500p4658501.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[hidden email]
http://lists.ximian.com/mailman/listinfo/monotouch


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