ios - changing tabbar images when tabbar not root view -


i looking @ changing graphics on tabbar, such as

- (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { uitabbarcontroller *tabbarcontroller = (uitabbarcontroller *)self.window.rootviewcontroller; uitabbar *tabbar = tabbarcontroller.tabbar; uitabbaritem *tabbaritem1 = [tabbar.items objectatindex:0]; uitabbaritem *tabbaritem2 = [tabbar.items objectatindex:1]; uitabbaritem *tabbaritem3 = [tabbar.items objectatindex:2]; uitabbaritem *tabbaritem4 = [tabbar.items objectatindex:3]; tabbaritem1.title = @"home"; tabbaritem2.title = @"maps"; tabbaritem3.title = @"my plan"; tabbaritem4.title = @"settings"; 

the problem have here tabbarcontroller not root view, how can reference tabbarcontroller change tab images?

i following suggestion post (can have more 1 uitabbarcontroller?) refers having tableview links 1 or more tabbarcontrollers.

so root view not tab bar, tab bar view loaded after coming 1 previous screen.

i have working, initial screen , tab bar, , working fine, need change graphics on tab bar, , not able tutorials on changing tab bar graphics use app delegate , refer tabbarcontroller root view.

any on appreciated!

tab bar items belong individual content view controllers in each tab, rather trying reference tab bar controller, should change tab item properties in controllers. if want changes visible tab bar controller comes on screen, need put customizations in awakefromnib or initwithcoder methods (for controllers set in ib).


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -