第20月第14天 objc_getAssociatedObject _cmd

1.

- (CustomNavigationControllerDelegate *)customDelegate
{
    return objc_getAssociatedObject(self, _cmd);
}

- (void)setCustomDelegate:(CustomNavigationControllerDelegate *)customDelegate
{
    objc_setAssociatedObject(self, @selector(customDelegate), customDelegate, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

 

https://www.jianshu.com/p/fdb1bc445266

 

posted @ 2018-05-16 14:20  lianhuaren  阅读(196)  评论(0编辑  收藏  举报