今天在给类的属性命名的时候,用了newValue。就给报错:property's synthesized
getter follows Cocoa naming convention for returning 'owned' objects
,一阵郁闷不知道咋回事,后来查了资料后,原来是命名规范的事情:

You own any object you create

You create an object using a method whose name begins with “alloc”, “new”, “copy”, or “mutableCopy” (for example, alloc, newObject,
or mutableCopy).

一定要注意命名规范,不能以alloc,new,copy。mutableCopy 作为开头命名。比方:newValue。

留此做个笔记。纪念一下。

小胖说事24-----property's synthesized getter follows Cocoa naming convention for returning 'owned' objec的更多相关文章

  1. error: property's synthesized getter follows Cocoa naming convention for returning 'owned' objects

    出现这样的情况,主要是属性名中包括  keyword. You can solve this by: Renaming that property: @property (strong, nonato ...

  2. Error解决:Property's synthesized getter follows Cocoa naming convention for returning 'owned'

    在项目中定义了以new开头的textField.结果报错: 先看我的源代码: #import <UIKit/UIKit.h> @interface ResetPasswordViewCon ...

  3. Property's synthesized getter follows Cocoa naming convention for returning

    Property's synthesized getter follows Cocoa naming convention for returning.   今天早上在整理代码的时候发现了如上警告. ...

  4. JSON: Property 'xxx' has no getter method的解决办法

    在使用JSONArray.fromObject时候出现JSONException:Property 'xxx' has no getter method. 解决办法:设置bean为public属性即可 ...

  5. JSON: property "xxx" has no getter method in class "..."

    Exception in thread "main" net.sf.json.JSONException: java.lang.NoSuchMethodException: Pro ...

  6. 小胖说事35-----Terminating app due to uncaught exception &#39;CALayerInvalidGeometry&#39;, reason: &#39;CALayer posi

    2011-06-11 15:19:17.167 ***[930:707] *** Terminating app due to uncaught exception 'CALayerInvalidGe ...

  7. 小胖说事20--------GCD笔记

    1.系统提供的dispatch方法 为了方便的使用GCD.苹果提供了一些方法方便我们将BLOCK放在主线程或者后台程序运行.或者延后运行. //后台运行: dispatch_async(dispatc ...

  8. 小胖说事29-----iOS中Navigation中左滑pop页面的三种方法

    第三中类型.自己定义任何位置返回页面的方式,上边的类就是.m,大家能够贴过去使用.这个类是继承NavigationController的.用这个类初始化rootController就能够了.这里还有源 ...

  9. 小胖说事28------iOS中extern,static和const差别和使用方法

    通俗的讲: extern字段使用的时候,声明的变量为全局变量,都能够调用,也有这样一种比較狭义的说法:extern能够扩展一个类中的变量到还有一个类中: static声明的变量是静态变量,变量值改变过 ...

随机推荐

  1. poj 2309

    http://poj.org/problem?id=2309//找规律 可以看到每个根节点都可以将其在同一层的最左边的根节点整除,并且最大值为该节点加上最左边的节点值-1,最小值为////为该节点减去 ...

  2. Linux内存分析

    Linux命令----分析内存的瓶颈    为了提高磁盘存取效率, Linux做了一些精心的设计, 除了对dentry进行缓存(用于VFS,加速文件路径名到inode的转换), 还采取了两种主要Cac ...

  3. QT绘制半透明窗体(改写paintEvent,超级简单)

    在派生类中重载QDialog的void paintEvent(QPaintEvent *)事件,在这个函数中加入以下代码 QPainter painter(this);    QLinearGradi ...

  4. Linux和windows下的shutdown命令

    Linux下的shutdown命令 shutdown [options] [time] [wall] options: --help 获取帮助 -h 关机 -r 重启 -c 取消 -k 仅显示警告信息 ...

  5. 包子IT面试培训

    包子IT面试培训 IT 面试不再怕,包子帮你圆个梦!

  6. mmc一维下料测试

    另一组数据, 长度 = 6000; 切割长度 = {1664, 1599, 1552, 1409, 1352, 802, 660}; 需求数量 = {32, 96, 160, 16, 384, 112 ...

  7. linux进程解析--进程切换

    为了控制进程的执行,linux内核必须有能力挂起正在cpu上运行的进程,换入想要切换的进程,也就是恢复以前某个挂起的进程,这就是linux的进程切换.  1进程切换的时机 一般来说,进程切换都是发生在 ...

  8. Android基调(十六)- Service:startService()、stopService()、bindService()、unbindService()加

    直行 第一 另外一种 第三种 总结 开门见山 开启服务有三种情况:假设直接使用服务,则没有必要进行绑定,可是假设要使用服务里面的方法.则要进行绑定. 具体的启动情况有下: ①调用startServic ...

  9. iTextSharp.text的一个使用,主要用来创建PDF

    using iTextSharp.text; //创建一个字体来使用和编码格式 BaseFont baseFont = BaseFont.CreateFont("C:\\Windows\\F ...

  10. 新安装的linux(linux mint 或则ubuntu)系统中安装postgresql-xc安装的包

    一:./configure的时候1,gcc的处理:sudo apt-get install clang && rvm install 1.9.3 --with-gcc=clang2,缺 ...