3 ms·
I'm surprised that he provides five versions of the method definition syntax and none of them are what Apple does and what I consider to be the standard: -
by zefhous 13y ago
I'm surprised that he provides five versions of the method definition syntax and none of them are what Apple does and what I consider to be the standard:
- (void)doSomethingWithParameter:(NSString *)parameter;
- rbritton 13y agoThat's what I use as well. In Apple's frameworks I've found them to be very inconsistent between different areas though.
- mpweiher 13y agoMaybe because these things simply don't matter. Worse than that, they distract from things that do. Bike shed?
- maxjg 13y agoThat is the convention officially endorsed by Apple (https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html#//apple_ref/doc/uid/20001282-BCIGIJJF https://developer.apple.com/library/ios/documentation/Cocoa/...)
- lyinsteve 13y agoYou're correct. I've updated the post with credit to you, thanks!
- zefhous 13y agoNo problem! Have you commonly come across all these variations? I have seen a couple different things but my experience working in objective-c written by others has been limited, so my impression was that the above was more widely accepted.
- lyinsteve 13y agoI contribute to CocoaPods repositories, so I've seen a lot. I don't really feel adamantly one way or the other, but just be consistent.
- atburrow 13y agoThat is my preferred method as well, but I've seen a lot of templates use: -(void) doSomethingWithParameter:(NSString *)parameter;
- pjscott 13y agoWhen in Rome, do as the Romans do.