开发者

How to handle sub-content in tabGroups in Titanium Mobile

开发者 https://www.devze.com 2023-02-22 18:06 出处:网络
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 conten

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 开发者_JAVA百科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.

0

精彩评论

暂无评论...
验证码 换一张
取 消