i want to add buttons on to my tab bar programmatically in my view…
i am having navigation controller but it does not allow me to add these ..
i want to create programmatically in my view…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Since a tab bar controller is a container view controller that you use to divide your application into two or more distinct modes of operation, most apps have navigation controllers as children of tab bar controllers.
Apple’s position is this:
That is not to say you cannot do things differently… The main question you have is that you have already placed a Nav Controller in the app and you want to create the tab bar controller programmatically. The only way I can therefore see this is that you don’t mind if the tabbar controller changes each time you change screens within the Nav Controller. Some apps work this way. Most do not.
If my assumptions above are true I would suggest you rethink your code to see if you want to pursue this line of development. If so, you can easily create a tabbar controller and attach it within the current view.
Here is code I use to create my setup for one of my apps:
There are so many situations where I feel it is easier to do everything programatically.
Hope this helps.