类扩展,为类添加属性
private var kHJRefreshHeaderKey: String = ""
/// header
var hj_header: HJRefreshHeaderView? {
get {
return (objc_getAssociatedObject(self,&kHJRefreshHeaderKey) as? HJRefreshHeaderView)
}
set(newValue) {
objc_setAssociatedObject(self,&kHJRefreshHeaderKey,newValue,objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
}
}