3 ms·
I'm still learning Objective-C but it always bothers me a bit when a controller conforms to many protocols. Are there strategies to manage this (other than #pr
by jeremy_wiebe 13y ago
I'm still learning Objective-C but it always bothers me a bit when a controller conforms to many protocols. Are there strategies to manage this (other than #pragma mark)?
I really like point #4. I'd take that further and say that most "keyed access" classes should be wrapped in a more domain-specific wrapper class (thinking of NSUserDefaults, and the like).
With regards to point #8, Apple actually recommends against naming functions starting with get... also, unless they are property getter overrides. (https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html#//apple_ref/doc/uid/20001282-BCIGIJJF https://developer.apple.com/library/mac/documentation/Cocoa/...)
Thanks for the article.
- weaksauce 13y agothe only other strategy I have seen is to instantiate handlers for the sub concerns. so set self.tv.delegate = myTVDelegate; or something like that. Apple warns against it because it goes against key value coding I think. I am kinda on the I wish they had a consistent prefix for stuff. maybe it's just my feeble mind, but I like to have the code completion remind me of what's available. the sometimes inconsistent naming conventions in different classes makes it tough to remember all the nuances when you don't use them every day.