What is the designated way to handle alternating content in the active tab of a tabGroup?
In my case I have a tableview with a toolbar on top, and when a row is clicked, I'd like to switch the content in that tab to a new content with a different (edit) toolbar.
In the KitchenSink demo app the window is just replaced as far as I can see. Is this the way to go? How are transitions handled?
Thank you for your answers,
Chris
You can open the new window on the current tab:
tab.open(newWindow);
This will use the standard iOS navigation transition animation.
Also, you can configure a window's navigation bar (top bar) without needing to create and add a toolbar using Window properties like title, leftNavButton, rightNavButton. For example, create an edit button and then do:
newWindow.rightNavButton = editButton;
Also, you can create a standard edit button by setting the systemButton property to Ti.UI.iPhone.SystemButton.EDIT.
Finally, to create a system button with any title, set title property and also set the style property to Ti.UI.iPhone.SystemButtonStyle.BORDERED.
Related
I try to use Storyboard to link an NSToolbar to different View Controller through Triggered Segues. I want them all to be opened in the same Window Controller. Here is a screenshot:
Clicking on each NSToolbarItem opens a new window instead of the same Window Controller. Any idea how this can be done without coding?
Thanks for any help
enter image description here
Basically, what you need to do is to just use an NSTabViewController - Set it and your window content and also select what style you want your toolbar to have! See image.
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
I am trying to create a custom tab bar for a universal application wherein i need to set the frame size accordingly. Kindly help me out with this..
if you are making universal app, so u need to make custom tab bar on the window base project, take image view, uibutton (custum button) ,images as per as your look and set all those accordingly. call the controller on the click of the custom button.
Is it possible to display a sub menu on a tab bar in iphone apps. I mean when a user clicks on a tab, instead of displaying a new view, displays a new set of buttons on the top of the tab.
Does anyone know how to implement this?
Well, you can't do it without displaying a new view but that view does not have to fill the screen. If you create a custom UIView subclass that positions itself under the button pressed, you can get the behavior you want.
Hello all what I would like to know is it even possible to change the Color of the top bar in this UITableView ( the nav + toolbar )(code wise).
http://sites.google.com/site/iphonesdktutorials/images/navtoolbar/App.jpg
Another question concerning the top bar , how do they manage to remove the backbutton
like here item 1 is the one I want to remove code wise.
http://1.bp.blogspot.com/_ixq8Dp4ESMo/Sc-qrEQzclI/AAAAAAAAAG4/EOqFoiQU9uA/s1600-h/detailview.jpg
1) Pull up the Tools->Attribute Inspector for you UINavigationBar in interface builder. Adjusting the Style and Tint attributes, among others, is the way that I have created many of my navigation bars.
2) If you would rather not see the back button, you can simply use the built in hide mechanism (from UINavigationItem reference):
setHidesBackButton:animated: Sets
whether the back button is hidden,
optionally animating the transition.
-(void)setHidesBackButton:(BOOL)hidesBackButton
animated:(BOOL)animated
Parameters:
hidesBackButton YES if the
back button is hidden when this
navigation item is the top item;
otherwise, NO.
animated YES to animate the
transition; otherwise, NO.
It would look like this:
[theNavBarItem setHidesBackButton:YES animated:false];
What's handy is that this sets a BOOL property that should keep the back bar hidden.
This is not about the UITableView but, a navigation controller.
There are many samples and guides out there on using table views in navigation controllers, including how to customize (e.g., the color of the top bar, or adding/removing/relabelling buttons).
One starting point is the apple website.
http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/UsingNavigationControllers/UsingNavigationControllers.html