开发者

What is the difference in defining a variable in .h file's interface() method alone without synthesis it?

开发者 https://www.devze.com 2023-02-04 11:16 出处:网络
Merged with What is the difference in defining a variable in .h file's interface() method alone without synthesizing it?.
Merged with What is the difference in defining a variable in .h file's interface() method alone without synthesizing it?. 开发者_如何学运维

I define a variable in .h file's interface method like this...

@interface ......{
int a;
}

Then i use it in .m file, it works fine....

Also i modified the code as

@interface ......{
int a;
}
@property(nonatomic) int a;

in .h file, and in .m file i set the int value as

@synthesis a;

Now also it works fine...

What is the different between both cases?

Thank you

0

精彩评论

暂无评论...
验证码 换一张
取 消