Objective-C 我可以简写 += 增量属性吗?
我正在调试我编写的一段代码。在其中,我使用简写来增加类的属性,
objectiveCClass.declaredProperty+= 1;
这种增量合法吗?
Possible Duplicate:
Mixing C pre/post increment/decrement with Objective-C dot operator works?
I'm debugging a piece of code that I wrote. Within it, I'm using a shorthand to increment a property of a class
objectiveCClass.declaredProperty+= 1;
is this kind of increment legal?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它有效
此代码:
输出:
1
3
foo 是一个合成的 int 属性:
我相信它会做
It works
This code:
Outputs:
1
3
foo is a synthesized int property:
I believe it will do
是简写
is shorthand for