iOS UIKit框架学习—UIToolbar

UIToolbar是显示一个或多个按钮的控件又称工具栏项。工具栏轻按时突出显示或不更改项目的外观。

@class UIBarButtonItem, UIColor;
@protocol UIToolbarDelegate;

NS_CLASS_AVAILABLE_IOS(2_0) __TVOS_PROHIBITED @interface UIToolbar : UIView 
// 工具栏外观样式
@property(nonatomic) UIBarStyle barStyle UI_APPEARANCE_SELECTOR __TVOS_PROHIBITED; // default is UIBarStyleDefault (blue)
// 工具栏上显示的选项
@property(nullable, nonatomic, copy) NSArray *items;
// 是否半透明显示
@property(nonatomic,assign,getter=isTranslucent) BOOL translucent NS_AVAILABLE_IOS(3_0) UI_APPEARANCE_SELECTOR;
// 工具栏上显示的选项,有动画效果
- (void)setItems:(nullable NSArray *)items animated:(BOOL)animated;
// 工具栏上按钮的底色
@property(null_resettable, nonatomic, strong) UIColor *tintColor;
// 工具栏的底色
@property(nullable, nonatomic, strong) UIColor *barTintColor NS_AVAILABLE_IOS(7_0) UI_APPEARANCE_SELECTOR;  // default is nil
// 设置用于在给定位置和给定度量的背景的图像
- (void)setBackgroundImage:(nullable UIImage *)backgroundImage forToolbarPosition:(UIBarPosition)topOrBottom barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
// 返回用于在给定位置和给定度量的背景的图像
- (nullable UIImage *)backgroundImageForToolbarPosition:(UIBarPosition)topOrBottom barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
// 设置用于给定位置的工具栏阴影的图像
- (void)setShadowImage:(nullable UIImage *)shadowImage forToolbarPosition:(UIBarPosition)topOrBottom NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
// 返回用于给定位置的工具栏阴影的图像
- (nullable UIImage *)shadowImageForToolbarPosition:(UIBarPosition)topOrBottom NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
// 代理
@property(nullable, nonatomic, weak) id delegate NS_AVAILABLE_IOS(7_0); // You may not set the delegate when the toolbar is managed by a UINavigationController.
@end

__TVOS_PROHIBITED
@protocol UIToolbarDelegate 
@end

你可能感兴趣的:(iOS UIKit框架学习—UIToolbar)