jezzmemo / JJException

Protect the objective-c application(保护App不闪退)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NSMutableAttributedString 的 setAttributes:range: 方法,其中attrs可以为nil

git4jwb opened this issue · comments

你好,NSMutableAttributedString 的 setAttributes:range: 方法,其中attrs可以为nil,不需要在hookSetAttributes:range:进行判空拦截了吧

@interface NSMutableAttributedString : NSAttributedString

- (void)setAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs range:(NSRange)range;

@end
commented

从官方的定义来看是nullable的,api的角度来说是可以为空的,确认没问题后,我会发布新版本