What I miss in Xcode when I write iPhone applications

Posted by – February 24, 2009

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:

//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. :D


3 Comments on What I miss in Xcode when I write iPhone applications

  1. rogerio says:

    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.

  2. rogerio says:

    Problem solved with help of this XCode plugin.

  3. rogerio says:

    XCode 3.2.1 now can provide code completion for protocol methods.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>