开发者

What are the coding-styles for grouping declarations of properties and corresponding synthesize calls? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

I'm still learning, so I don't have my working convention yet for grouping my properties in header files, and the same is about synthesize calls. Sometimes I group them in one order, sometimes in another order. Also, I'm synthesizing those properties in one or two paragraph of calls, but I saw some people use different synthesize call for every property. However, my laziness tell me that approach is a little big coding overhead :)

Later, I'm adding new stuff as development goes thought, so very often, I end up in a sort of a mess IMHO :) I do understand and try to use as much MVCs as I can, but 开发者_StackOverflow社区still some of my MVCs contain 20 - 30 properties because of a lot of graphics that are designed in IB. Later, I'm doing some refactoring but still curious maybe some of you have a strong rules for code cleanness?


With @synthesize I always put them on separate lines so each prop has its own synth directive, this really helps with version control and clarity.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜