UIBarButtonItem
2014-07-22 12:45 Leehoh 阅读(292) 评论(0) 收藏 举报一个bar button item是专门用来放在uitoolbar 和uinavigationbar上的对象。他继承自UIBarItem。UIBarButtonItem定义了额外的初始化方法和属性用于再toolbars喝navigation bars上。
Initializing an Item
– initWithBarButtonSystemItem:target:action:– initWithCustomView:– initWithImage:style:target:action:– initWithTitle:style:target:action:– initWithImage:landscapeImagePhone:style:target:action:
Getting and Setting Properties
targetproperty-
actionproperty -
styleproperty -
possibleTitlesproperty -
widthproperty 如果此值为正的,宽度固定,为0或负数,按照标题、图像大小来定宽度。默认为0 -
customViewproperty
Customizing Appearance
-
tintColorproperty – backButtonBackgroundImageForState:barMetrics:– setBackButtonBackgroundImage:forState:barMetrics:– backButtonTitlePositionAdjustmentForBarMetrics:– setBackButtonTitlePositionAdjustment:forBarMetrics:– backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:– setBackButtonBackgroundVerticalPositionAdjustment:forBarMetrics:– backgroundVerticalPositionAdjustmentForBarMetrics:– setBackgroundVerticalPositionAdjustment:forBarMetrics:– backgroundImageForState:barMetrics:– setBackgroundImage:forState:barMetrics:– backgroundImageForState:style:barMetrics:– setBackgroundImage:forState:style:barMetrics:– titlePositionAdjustmentForBarMetrics:– setTitlePositionAdjustment:forBarMetrics:
浙公网安备 33010602011771号