MoreViewController, edit, noneditable icon - iphone

I am using TabBar with more than 5 icons, co I get the MoreViewController as well and can edit icons in the TabBar. But I did not find the option how to forbid editing of one of the icons - similar to More. How can i fixate one icon?
In the docu there is description of beginCustomizingItems, which if containing the item, will make it non-editable - thats what I want. But I did not find how to use this method. All is done automatically.

In your UITabBarController, set your customizableViewControllers to an array of viewControllers that can be customized.
From the docs:
"This property controls which items in the tab bar can be rearranged by the user. When the user taps the More item on the tab bar view, a custom interface appears displaying any items that did not fit on the main tab bar. This interface also contains an Edit button that allows the user to rearrange the items. Only the items whose associated view controllers are in this array can be rearranged from this interface. If the array is empty or the value of this property is nil, the tab bar does not allow any items to be rearranged."

Related

Programmatically hiding a view controller from a tab bar application

I am working on a tab bar application. Is there a way I can programmatically hide one view controller from the scroll down list and from the "edit" list (but still be able to pop it on screen with a certain action, i.e. by calling its tabbarcontroller index)?
The problem is that I have now so many viewcontrollers that completely fill the "edit" screen. So I want to hide some of them and be able to trigger the hidden ones trough some action performed on one of the visible ones.
Thanks

iPhone app: navigate to tab bar scenario

I have an application with a maybe-strange navigation scenario. I'll try to explain:
1) first scene: select an available item from a list
1.1) once selected, you navigate to a tab view allowing you to view/edit the various attributes
2) if the desired item isn't available, you may create a new one (by selecting a "+" bar button) which navigates to an alternate scene
2.1) there may be multiple scenes required to create the item, all scenes are simply pushed on the stack to allow the user to go back, select different options, etc.
2.2) once all scenes have been displayed and all attributes have been collected, the new "item" will be created and saved.
2.3) now, I want to automatically act as though the user selected this item from the beginning, that is, I want to pop all previous views off the stack and navigate directly into the tabs (step 1.1).
Does this make sense? Easy to do? Is there a better way to go about this? I'm using xCode 4.2 with storyboards.
Any guidance would be appreciated.
If you want (+) button on TabBar you should subclass UITabBar: Fo ex. TabBarPlus and set this class in storyboard.
But easier place (+) button on navigation bar.
The max number of displaying tabsart is 5 for iphone and 8 for ipad. If the there > number of tabs the last is "More" tab thet displaing list of other tubs in tableview. I you want displaying more tabs on tabbar then you should subclass UITabBar :)
If you want by back button on naigation bar switching beetwing Views that references with TabBar buttons you must create stack in code and hide backbutton of navigationbar and use castom left button of navigationbar.
The other navigation can be easy done in storyboard

uitabbarcontroller

I wrote an app that uses UITabBarController, but if I add a lot of tabs it don't show me more button. Doesn't the UITabBarController creates this button automatically?
No - according to the documentation, you should not need to handle this yourself.
The tab bar has limited space for
displaying your custom items. If you add six or more custom view
controllers to a tab bar controller, the tab bar controller displays
only the first four items plus the standard More item on the tab bar.
Tapping the More item brings up a standard interface for selecting the
remaining items.
Yes, you need to create it manually. The "fifth tab is more" is just a convention. It's up to you to create a UIView/UIViewController pair to manage your additional settings and map them to that fifth tab.

UITabBarController with more than six icons

i'm developing an iPhone application and i'm implementing the navigation among views with the UITabBarController.
The documentation says :
"The tab bar has limited space for
displaying your custom items. If you
add six or more custom view
controllers to a tab bar controller,
the tab bar controller displays only
the first four items plus the standard
More item on the tab bar. Tapping the
More item brings up a standard
interface for selecting the remaining
items. The interface for the standard
More item includes an Edit button that
allows the user to reconfigure the tab
bar. By default, the user is allowed
to rearrange all items on the tab bar.
If you do not want the user to modify
some items, though, you can remove the
appropriate view controllers from the
array in the
customizableViewControllers property."
Is there a way i can force the control to use exactly six icons without adding the "More ..." one?
You could subclass the object, and override its drawing properties, but it would most likely be rejected by Apple, as it is an inconsistant UI, and would go against the holy HIGs.
No, the tab bar will only accommodate up to five items. Once you add more than that you get four plus the more button showing.

UITabBarController.moreNavigationController disable items

I am using UITabBarController for my 7 viewcontorller. UITabBarController is showing by default more button. When I pressed more button it will show me table view which contains 3 more tabbar items in list. I would like to disable one items from tableview list. Could you please help me how can I disable only single item from tableview list?
thanks
Manoj
Have a look at the documentation for the cusomizableViewControllers property of UITabBarController. This property is an array that contains the subset of all your tab view controllers that are 'customizable' i.e. that can be moved around and added to the tab bar.
Remove a view controller from this array to disable customization.
You can't disable / enable items from the "More" tab bar item. You can remove one or many, as you want, though, by changing the array in the UITabBar's items property.