UIBarButtonItem(FWBlock)
@interface UIBarButtonItem (FWBlock)
iOS11之后,customView必须具有intrinsicContentSize值才能点击,可使用frame布局或者实现intrinsicContentSize即可
-
自定义标题样式属性,兼容appearance,默认nil同系统
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSDictionary<NSAttributedStringKey, id> *fw_titleAttributes;
-
设置当前Item触发句柄,nil时清空句柄
Declaration
Objective-C
- (void)fw_setBlock:(nullable void (^)(id _Nonnull __strong))block;
-
使用指定对象和事件创建Item,支持UIImage|NSString|NSNumber|NSAttributedString等
Declaration
Objective-C
+ (nonnull instancetype)fw_itemWithObject:(nullable id)object target:(nullable id)target action:(nullable SEL)action;
-
使用指定对象和句柄创建Item,支持UIImage|NSString|NSNumber|NSAttributedString等
Declaration
Objective-C
+ (nonnull instancetype) fw_itemWithObject:(nullable id)object block:(nullable void (^)(id _Nonnull __strong))block;