Writable atomic property '***' cannot pair a synthesized setter/getter with a user defined
来源:互联网 发布:维普数据库论文检测 编辑:程序博客网 时间:2024/04/29 19:25
1. warning: Semantic Issue: Writable atomic property 'number' cannot pair a synthesized setter/getter with a user defined
setter/getter 指示在AFItemView.m文件
2. warning: Semantic Issue: Writable atomic property 'numberOfImages' cannot pair a synthesized setter/getter with a user defined setter/getter 指示在AFOpenFlowView.m文件
查找这两个文件的头文件声明获知,这两个属性声明是这样的:
@property int number;
@propertyint numberOfImages;
反正感觉上另类,也就直接更改为以下:
@property (nonatomic) int number;
@property (nonatomic) int numberOfImages;
居然就顺利通过,没有再报警告错误了。此后查找资料,得知可以有以下几种方法解决:
1. 声明属性为nonatomic,即我上面的修改方法。
2. @synthesize合成用getter/setter方法(即自己手动定义getter/setter方法)。
3. 用@dynamic来代替@synthesize。
4. 直接不用属性@property。
转:http://blog.sina.com.cn/s/blog_6fd90b5b01016gy1.html
- Writable atomic property '***' cannot pair a synthesized setter/getter with a user defined
- xcode 4.3.2加载旧的Xcode工程(解决办法) Writable atomic property '' cannot pair a synthesized setter/getter
- [Objective-C] class add a property and its setter and getter
- setter,getter,@property,@synthesize
- Property’s synthesized getter follows Cocoa naming
- @property简化setter、getter方法
- Cannot find any information on property 'User' in a bean of type 'com.entity.user'
- [Objective-C] property setter/getter via @property
- warning: property's synthesized getter follows Cocoa naming convention for
- Property's synthesized getter follows Cocoa naming convention for returning.
- Property's synthesized getter follows Cocoa naming convention for returning.
- Property's synthesized getter follows Cocoa naming convention for returning.
- Property's synthesized getter follows Cocoa naming convention for returning.
- Property's synthesized getter follows Cocoa naming convention for returning.
- Property's synthesized getter follows Cocoa naming convention for returning
- warning: property's synthesized getter follows Cocoa naming convention for
- Property's synthesized getter follows Cocoa naming convention for returning
- Property's synthesized getter follows Cocoa naming convention for returning
- Spring mvc笔记和学习
- Ubuntu下添加开机启动脚本
- 自考,终点站
- asp.net中DataList之分页
- 【Java并发编程】之四:守护线程与线程阻塞的四种情况
- Writable atomic property '***' cannot pair a synthesized setter/getter with a user defined
- Log4j配置文件解析以及加载自己的配置文件
- log4j(一) 自定义属性
- jQuery.each 中的 return
- Fatal NI connect error 12170.
- 面试题重建二叉树
- MAKEFILE -- 自动生成依赖性
- 【Java并发编程】之五:volatile变量修饰符—意料之外的问题(含代码)
- Cocos2d-x游戏引擎迈入3.0时代 打造完整工具链