SkeletonLayout
@objc(FWSkeletonLayout)
@objcMembers
open class SkeletonLayout : SkeletonView
骨架屏布局视图,可从视图生成骨架屏,嵌套到UIScrollView即可实现滚动
-
相对布局视图
Declaration
Swift
open weak var layoutView: UIView? { get set }
-
指定相对布局视图初始化
Declaration
Swift
public init(layoutView: UIView?)
-
Undocumented
Declaration
Swift
public override init(frame: CGRect)
-
Undocumented
Declaration
Swift
required public init?(coder: NSCoder)
-
设置相对滚动视图,实现跟随下拉刷新等效果。block参数为contentOffset.y(不大于0),默认设置顶部布局跟随滚动
Declaration
Swift
open func setScrollView(_ scrollView: UIScrollView, scrollBlock: ((CGFloat) -> ())? = nil)
-
添加动画视图,不会调用addSubview
Declaration
Swift
open func addAnimationViews(_ animationViews: [SkeletonView])
-
添加动画视图,不会调用addSubview
Declaration
Swift
open func addAnimationView(_ animationView: SkeletonView)
-
移除动画视图,不会调用removeFromSuperview
Declaration
Swift
open func removeAnimationView(_ animationView: SkeletonView)
-
批量开始动画
Declaration
Swift
open override func startAnimating()
-
批量停止动画
Declaration
Swift
open override func stopAnimating()
-
批量添加子视图(兼容骨架视图),返回生成的骨架视图数组
Declaration
Swift
@discardableResult open func addSkeletonViews(_ views: [UIView]) -> [SkeletonView]
-
批量添加子视图(兼容骨架视图),支持自定义骨架,返回生成的骨架视图数组
Declaration
Swift
@discardableResult open func addSkeletonViews(_ views: [UIView], block: ((SkeletonView, Int) -> Void)?) -> [SkeletonView]
-
添加单个子视图(兼容骨架视图),返回生成的骨架视图
Declaration
Swift
@discardableResult open func addSkeletonView(_ view: UIView) -> SkeletonView
-
添加单个子视图(兼容骨架视图),支持自定义骨架,返回生成的骨架视图
Declaration
Swift
@discardableResult open func addSkeletonView(_ view: UIView, block: ((SkeletonView) -> Void)?) -> SkeletonView
-
添加单个布局视图(兼容骨架视图),返回生成的骨架布局
Declaration
Swift
@discardableResult open func addSkeletonLayout(_ view: UIView) -> SkeletonLayout
-
添加单个布局视图(兼容骨架视图),支持自定义骨架,返回生成的骨架布局
Declaration
Swift
@discardableResult open func addSkeletonLayout(_ view: UIView, block: ((SkeletonLayout) -> Void)?) -> SkeletonLayout
-
解析视图为骨架视图
Declaration
Swift
open class func parseSkeletonView(_ view: UIView) -> SkeletonView
-
解析布局视图为骨架布局
Declaration
Swift
open class func parseSkeletonLayout(_ view: UIView) -> SkeletonLayout