12 Jan 2012, 23:52
Generic-user-small

Matt Anderson (8 posts)

On page 142, further thought #1 suggests having an edit button at the top left of the table view of recipes, which puts the table view in “edit mode.” I’m not an expert on the iPhone user interface guidelines, but this doesn’t feel right to me. My gut tells me that the detail view of the recipe should have an Edit button at the top right - Apple does this in the Contacts app for instance, which is a one-window-drilldown app like our recipe app. Thoughts?

20 Jan 2012, 17:03
Generic-user-small

Mark Winkler (2 posts)

I agree that a more intuitive edit flow would stem from the detail. However, the list edit button presents the challenge of handling multiple segues.

In case anyone else had trouble with this: remove the segue from the table cell and create two segues from the tableViewController itself. Then you can invoke the segues conditionally in tableView:didSelectRowAtIndexPath:

`
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if (self.inEditMode) {
        [self performSegueWithIdentifier:@"editRecipe" sender:indexPath];
    } else {
        [self performSegueWithIdentifier:@"presentRecipeDetail" sender:indexPath];
    }
}
`
18 Apr 2012, 21:14
Dsc_0019_2_pragsmall

Eddy Josafat Hernández Vega (10 posts)

How can I create two segues from the tableViewController? I can’t use ctrl + drag to create them.

By the way, How can I change the visual style of the cells to give a clue about editing mode to the user?

20 Apr 2012, 20:04
Biopic_100x100_pragsmall

Bill Dudney (917 posts)

Hi Eddy - you can’t create more than one segue from a table view cell. I my opinion its a bug in IB, please file a bug at http://bugreporter.apple.com requesting the ability to put multiple segues from a TVC.

Changing the visual style can be done in many ways. I’d need more info on what you are trying to do to provide an answer.

02 Jun 2012, 22:43
Dsc_0019_2_pragsmall

Eddy Josafat Hernández Vega (10 posts)

I mean how to give a visual clue to the user that he can edit the cells, like, by instance, editing bookmarks in safari

10 Apr 2013, 22:46
Jeff_pragsmall

Jeff Chang (3 posts)

Thanks for the tip Mark. That did the trick of having multipel segues using the TableViewController itself!

  You must be logged in to comment