IBOutlet declarations?

前端 未结 4 1072
忘掉有多难
忘掉有多难 2021-02-14 02:54

I have seen the code below written 3 different ways (with regards to IBOutlet) Does it matter, I would say adding IBOutlet to both the declaration and the @property was more con

4条回答
  •  野性不改
    2021-02-14 03:18

    Should not matter. With the 10.6 64-bit SDK you can also write the property without the ivar:

    @class SwitchViewController;
    
    @interface iPhone_switcherAppDelegate : NSObject  {
    }
    
    @property(nonatomic, retain) IBOutlet UIWindow *window;
    @property(nonatomic, retain) IBOutlet SwitchViewController *switchViewController;
    @end
    

提交回复
热议问题