iphone - Add a custom back button to Navigation Bar using MonoTouch -


just want confirm this, i'm trying learn monotouch alone..

i have view navigate using navigationcontroller.pushviewtocontroller(). on destination view, have navigation bar. can add button bar , use code push view (i happen know is), fine.

is there existing "back button" control? or way in code change existing button "go back"?

in interface builder can see there property on navigationitem called "back". when add text can see new barbuttonitem added navigationbar. never see button when navigate view in simulator. if try drag item onto view manually, "back" text cleared , button treated custom button.

do have manually code button?

the default button (the 1 takes name of previous controller) cannot customized. can hide , replace button new one.

if have controller, can on viewdidload method. overriding method sure elements have been set.

// allows hide button navigationitem.sethidesbackbutton(true,true);  // allows create new customized button navigationitem.leftbarbuttonitem = new uibarbuttonitem(...); 

uibarbuttonitem takes handler can use control navigation.

in handler can this:

navigationcontroller. popviewcontrolleranimated(true); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -