FWToolbarView
@interface FWToolbarView : UIView
自定义工具栏视图,高度自动布局(总高度toolbarHeight),可设置toolbarHidden隐藏(总高度0)
根据toolbarPosition自动设置默认高度,可自定义,如下: 顶部:topView,高度为topHeight,可设置topHidden隐藏 中间:menuView,高度为menuHeight,可设置menuHidden隐藏 底部:bottomView,高度为bottomHeight,可设置bottomHidden隐藏
-
指定类型初始化,会设置默认高度和视图
Declaration
Objective-C
- (nonnull instancetype)initWithType:(FWToolbarViewType)type;
-
当前工具栏类型,只读,默认default
Declaration
Objective-C
@property (nonatomic, readonly) FWToolbarViewType type;
-
背景图片视图,用于设置背景图片
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIImageView *_Nonnull backgroundView;
-
顶部视图,延迟加载
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull topView;
-
菜单视图,初始加载
Declaration
Objective-C
@property (nonatomic, strong, readonly) FWToolbarMenuView *_Nonnull menuView;
-
底部视图,延迟加载
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIView *_Nonnull bottomView;
-
顶部高度,根据类型初始化
Declaration
Objective-C
@property (nonatomic) CGFloat topHeight;
-
菜单高度,根据类型初始化
Declaration
Objective-C
@property (nonatomic) CGFloat menuHeight;
-
底部高度,根据类型初始化
Declaration
Objective-C
@property (nonatomic) CGFloat bottomHeight;
-
工具栏总高度,topHeight+menuHeight+bottomHeight,隐藏时为0
Declaration
Objective-C
@property (nonatomic, readonly) CGFloat toolbarHeight;
-
顶部栏是否隐藏,默认NO
Declaration
Objective-C
@property (nonatomic) BOOL topHidden;
-
菜单是否隐藏,默认NO
Declaration
Objective-C
@property (nonatomic) BOOL menuHidden;
-
底部栏是否隐藏,默认NO
Declaration
Objective-C
@property (nonatomic) BOOL bottomHidden;
-
工具栏是否隐藏,默认NO,推荐使用(系统hidden切换时无动画)
Declaration
Objective-C
@property (nonatomic) BOOL toolbarHidden;
-
动态隐藏顶部栏
Declaration
Objective-C
- (void)setTopHidden:(BOOL)hidden animated:(BOOL)animated;
-
动态隐藏菜单栏
Declaration
Objective-C
- (void)setMenuHidden:(BOOL)hidden animated:(BOOL)animated;
-
动态隐藏底部栏
Declaration
Objective-C
- (void)setBottomHidden:(BOOL)hidden animated:(BOOL)animated;
-
动态隐藏工具栏
Declaration
Objective-C
- (void)setToolbarHidden:(BOOL)hidden animated:(BOOL)animated;