has uitabbarcontroller changed in xcode 4

拜拜、爱过 提交于 2019-12-12 17:13:31

问题


I recently upgraded to xcode 4. My application utilizes tabbarcontroller. In old xcode 3.x, you were able to change the tabs to different types per this screenshot:

From what I gather in researching this issue, xcode 4 no longer offers this functionality. Am I missing something? From what I researched we are now suppose to delete/add tabs then change attributes to get the desired effect. So, to that end in xcode 4, I've added a new tab item and made the class a UINavigationController fully expecting the ability to toggle the "Shows Navigation Bar" with a checkbox. But, the "Navigation Controller" grouping never appears. What am I missing?

Thanks for your help.


回答1:


I was surprised at first too and I was about to ask the same question. But, when you open the Object Library, in the bottom you can see a big star, "Tab Bar Item". Just drag that to the tab bar and you will notice a new item added to the tab bar controller.




回答2:


Weird but works! Just drag drop View Controller onto tabs!

Thanks




回答3:


I played with xcode 4 a little bit more and discovered you can drag Navigation Controller from library onto your UITabBarController and it will create your tab item for you and set it up as a NavigationController. Pretty cool. Hopefully this will help others.



来源:https://stackoverflow.com/questions/5301559/has-uitabbarcontroller-changed-in-xcode-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!