You can use the tooltip in the first link that Simon posted above to get the method signatures for the delegate. After that, adding the code is up to you.
What I like to do is select the delegate methods that I use most often and add them to the code snippet.
For example, for a UITableViewDatasource, I have a fragment called "UITableView Datasource Required Methods" containing:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *cellIdentifier = @"myCellName"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease]; }
Then I drag this piece of code into my code whenever I create a table delegate.
source share