2012年3月29日 星期四

titanium systembutton適用環境


根據http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Button-object

system button只能用在以下環境

Titanium.UI.iOS.Toolbar. The items array can contain system buttons.

Titanium.UI.iPad.Popover. The leftNavButton and rightNavButton properties can refer to system buttons

Titanium.UI.iPad.SplitWindow. The toolbar array can contain system buttons.

以下環境需要用toolbar放置
Titanium.UI.TextField. The keyboardToolbar array can contain system buttons.

Titanium.UI.TextArea. The keyboardToolbar array can contain system buttons.

Titanium.UI.Window. The leftNavButton and rightNavButton properties can refer to system buttons
and the toolbar array can contain system buttons.

範例
var cancelButton = Ti.UI.createButton({ systemButton: Ti.UI.iPhone.SystemButton.CANCEL });

沒有留言: