Autosynthesized property 'delegate' will use synthesized instance variable '_delegate', not existing instance variable 'delegate'

后端 未结 2 666
暗喜
暗喜 2020-12-05 08:14

I\'m following the guide here to create a custom delegate. It runs fine but I get the following warning in xcode

DetailViewController.m:23:1: Autosynt

2条回答
  •  长情又很酷
    2020-12-05 08:19

    There's another method and this one worked for me:

    @property (nonatomic, unsafe_unretained) id  delegate;
    

    You can then add this to the implementation without error:

    @synthesize delegate;
    

    Also: This is ARC compliant.

提交回复
热议问题