ios - add button navigationbar center -


it easy add left , right buttonbaritem on navigationbar

but hope add button navigationbar center

my code

 [self.navigationitem.titleview addsubview:button ];//button not nil 

but nothing happens

yourc comment welcome

the titleview nil default code doesn't anything.

change code to:

self.navigationitem.titleview = button; 

this sets button titleview.


Comments

Popular posts from this blog

xslt - Substring before throwing error -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

oracle - Changing start date for system jobs related to automatic statistics collections in 11g -