Clicky

iOS Dev Nugget 74 Autocompletion of Method in a Protocol

.

Need to run a code review on your codebase? Hire me

Many of us use Xcode for iOS (and OS X) development. While it isn't the best code editor, it is steadily improving and certain features can stay hidden if you don't track releases carefully.

For e.g. one of the more useful autocompletion that Xcode can perform is when you implement a protocol. For example, if you implement UITableViewDelegate in your class:

@interface MyClass : NSObject<UITableViewDelegate>
@end

@implementation MyClass

//type below here

@end

When you place your cursor below the comment “type below here” and type “-table”, it should – if not, hit Ctrl-space – show a list of methods you can implement according to the protocols you have implemented.

Nifty?


Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues