What I miss in Xcode when I write iPhone applications
One of the missing features in Xcode is the hability to add code sense for protocol methods that can be implemented by a class, for example a class that extends UITableViewController, these classes may have a custom implementation of methods found on both UITableViewDelegate or UITableViewDatasource protocols, the signature of these methods isn’t so easy to memorize and some code completion at this point would help a lot.
A small list of protocol methods signatures that is hard to memorize when working with UITableViews:
1 2 3 4 5 6 | //To render table cells - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; //To return an icon for row selection - (UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath; //To return a title for a section in a table - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section; |
The example above contains only some methods of UITableViewDelegate protocol, the entire iPhone API has a lot of others protocols, each one with a bunch of methods that can be implemented by developer, if you have a good memory, don’t worry, memorize methods parameters of all protocols that you use will a piece of cake to you, but it isn’t true for me.
In many aspects the Xcode team must learn something from Eclipse team. If you are writing a class in Eclipse that implements a specific interface and you haven’t added any of interface method in this class then Eclipse automatically reports an error and help the user on implement these methods.
February 27th, 2009 | #
Problem solved with help of this XCode plugin.
October 3rd, 2009 | #
XCode 3.2.1 now can provide code completion for protocol methods.
November 25th, 2009 | #