首页 > 代码库 > UIBarButtonItem
UIBarButtonItem
一个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
target
property-
action
property -
style
property -
possibleTitles
property -
width
property 如果此值为正的,宽度固定,为0或负数,按照标题、图像大小来定宽度。默认为0 -
customView
property
Customizing Appearance
-
tintColor
property – 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:
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。