ios - How to create custom navigation bar programmatically? -
i'm developer in objective c , need with set custom navigation bar on navigation controller programmatically don't use story board or xib.
you can use this, if targeting ios 5 , above
[mynavigationcontroller.navigationbar setbackgroundimage:[uiimage imagenamed:@"customnavbar.png"] forbarmetrics:uibarmetricsdefault];
or
[[mynavigationcontroller.navigationbar appearance] setbackgroundimage:navbackground forbarmetrics:uibarmetricsdefault];
you may need add custom navbar buttons.
also have @ answers here.
Comments
Post a Comment