开发者

What is the difference in defining a variable in .h file's interface() method alone without synthesis 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜