V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  fly2never  ›  全部回复第 25 页 / 共 46 页
回复总数  911
1 ... 21  22  23  24  25  26  27  28  29  30 ... 46  
2012-04-12 13:03:22 +08:00
回复了 fly2never 创建的主题 iDev 一篇Objective-C(最佳)实践的文章
@ultragtx 这里的"NEVER access your own data members directly" 应该是指子类吧.
其他类调用,默认protect会禁止使用,只有子类才有可能直接使用.
2012-04-12 13:01:06 +08:00
回复了 fly2never 创建的主题 iDev 一篇Objective-C(最佳)实践的文章
@ultragtx 嗯,想了下这样确实不好.class类中如果要使用,还是推荐instance variable.
原文中有描述:
"NEVER allow your instance variable names to be confused with property names, or with data member names. ALWAYS end your instance variable names with an underscore. UNLESS you are subclassing a 3rd-party class which already has a data member of the same name, in which case pick another non-similar name or add another underscore and put a comment in as to why you did this.

Use “@synthesize name = name_;” in your implementation, instead of just “@synthesize name;”

WHY?
Even within the class implementation you have to have a very good reason to access a data member directly, instead preferring property accessors."
2012-04-11 16:52:03 +08:00
回复了 fly2never 创建的主题 iDev 一篇Objective-C(最佳)实践的文章
@ultragtx 全部用属性而不用成员变量的原因我觉得是通过强制规范禁止使用成员变量,以免内存问题.取消了成员变量就不可能出现成员变量被赋值的情况,全部都通过属性来处理.这样对团队开发很有意义.当然如果一个人开发,能保证setter的时候全部用属性,不用成员变量也没大问题.
tab+space
2012-03-31 14:17:15 +08:00
回复了 dazuiba 创建的主题 iDev 用macros简化Objective-C开发: ConciseKit
不知为何,想起了这货
http://eerolanguage.org/
2012-03-31 14:13:24 +08:00
回复了 dazuiba 创建的主题 iDev 用macros简化Objective-C开发: ConciseKit
等4.4
2012-03-30 19:59:15 +08:00
回复了 lldong 创建的主题 分享发现 Matz - How emacs changed my life
@loading 我靠,还真有nano党啊
2012-03-29 22:51:32 +08:00
回复了 lldong 创建的主题 分享发现 Matz - How emacs changed my life
2012-03-28 19:41:35 +08:00
回复了 chuangbo 创建的主题 酷工作 [山东烟台] DNSPod 招聘 Web 前端
这个价格略低了点,不过不清楚烟台物价如何
2012-03-26 20:11:23 +08:00
回复了 karuto 创建的主题 git Legit (Git Workflow for Humans)
@karuto 用git flow的路过
@sospartan 没有iPhone的界面照着android做来得蛋疼吧,某公司中枪了....
2012-03-22 23:20:40 +08:00
回复了 hellmash 创建的主题 iDev xCode这样的更新方式才叫软件更新啊!
我从App Store里面更新怎么是1.5G.....
2012-03-21 15:28:55 +08:00
回复了 lushnis 创建的主题 分享发现 你在哪儿发现优秀的 iOS App ?
感谢分享
2012-03-20 18:15:47 +08:00
回复了 linsk 创建的主题 随想 貌似程序界实现了共产主义
信息成本复制低,实物成本复制高
2012-03-18 15:15:05 +08:00
回复了 kingwkb 创建的主题 Python pycharm编辑器 光标移动最后一行快捷键是什么
com+down不行么
restoremenot
大丈夫是不是也是网络用语?
2012-03-05 10:28:59 +08:00
回复了 blankyao 创建的主题 iDev 关于iOS平台的crash report
异常收集目前用的友盟,以前用的testflight,不过国内访问速度很慢,而且每次还要上传dsym文件,还是友盟用起来舒服
1 ... 21  22  23  24  25  26  27  28  29  30 ... 46  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   838 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 45ms · UTC 20:34 · PVG 04:34 · LAX 13:34 · JFK 16:34
Developed with CodeLauncher
♥ Do have faith in what you're doing.