ToolbarView
@MainActor
open class ToolbarView : UIView
自定义工具栏视图,使用非等比例缩放布局,高度自动布局(总高度toolbarHeight),可设置toolbarHidden隐藏(总高度0)
根据toolbarPosition自动设置默认高度,可自定义,如下: 顶部:topView,高度为topHeight,可设置topHidden隐藏 中间:menuView,高度为menuHeight,可设置menuHidden隐藏 底部:bottomView,高度为bottomHeight,可设置bottomHidden隐藏
-
当前工具栏类型,只读,默认default
Declaration
Swift
@MainActor open private(set) var type: ToolbarViewType { get }
-
顶部高度,根据类型初始化
Declaration
Swift
@MainActor open var topHeight: CGFloat { get set }
-
菜单高度,根据类型初始化
Declaration
Swift
@MainActor open var menuHeight: CGFloat { get set }
-
底部高度,根据类型初始化
Declaration
Swift
@MainActor open var bottomHeight: CGFloat { get set }
-
工具栏总高度,topHeight+menuHeight+bottomHeight,隐藏时为0
Declaration
Swift
@MainActor open var toolbarHeight: CGFloat { get }
-
顶部栏是否隐藏,默认NO
Declaration
Swift
@MainActor open var topHidden: Bool { get set }
-
菜单是否隐藏,默认NO
Declaration
Swift
@MainActor open var menuHidden: Bool { get set }
-
底部栏是否隐藏,默认NO
Declaration
Swift
@MainActor open var bottomHidden: Bool { get set }
-
工具栏是否隐藏,默认NO,推荐使用(系统hidden切换时无动画)
Declaration
Swift
@MainActor open var toolbarHidden: Bool { get set }
-
Undocumented
Declaration
Swift
@MainActor override open var isHidden: Bool { get set }
-
背景图片视图,用于设置背景图片
Declaration
Swift
@MainActor open lazy var backgroundView: UIImageView { get set }
-
顶部视图,延迟加载
Declaration
Swift
@MainActor open lazy var topView: UIView { get set }
-
菜单视图,初始加载
Declaration
Swift
@MainActor open lazy var menuView: ToolbarMenuView { get set }
-
底部视图,延迟加载
Declaration
Swift
@MainActor open lazy var bottomView: UIView { get set }
-
Undocumented
Declaration
Swift
@MainActor override public init(frame: CGRect)
-
Undocumented
Declaration
Swift
@MainActor public required init?(coder: NSCoder)
-
指定类型初始化,会设置默认高度和视图
Declaration
Swift
@MainActor public init(type: ToolbarViewType)
-
Undocumented
Declaration
Swift
@MainActor open func updateHeight(_ isInitialize: Bool)
-
Undocumented
Declaration
Swift
@MainActor open func updateLayout(_ animated: Bool)
-
Undocumented
Declaration
Swift
@MainActor override open func safeAreaInsetsDidChange()
-
Undocumented
Declaration
Swift
@MainActor override open func updateConstraints()
-
Undocumented
Declaration
Swift
@MainActor override open func sizeThatFits(_ size: CGSize) -> CGSize
-
Undocumented
Declaration
Swift
@MainActor override open var intrinsicContentSize: CGSize { get }
-
Undocumented
Declaration
Swift
@MainActor override open func point(inside point: CGPoint, with event: UIEvent?) -> Bool
-
动态隐藏顶部栏
Declaration
Swift
@MainActor open func setTopHidden(_ hidden: Bool, animated: Bool)
-
动态隐藏菜单栏
Declaration
Swift
@MainActor open func setMenuHidden(_ hidden: Bool, animated: Bool)
-
动态隐藏底部栏
Declaration
Swift
@MainActor open func setBottomHidden(_ hidden: Bool, animated: Bool)
-
动态隐藏工具栏
Declaration
Swift
@MainActor open func setToolbarHidden(_ hidden: Bool, animated: Bool)