6. Storyboard
• Visual representation of iOS user interface (UI)
• Shows screens of content and connections
between screens. Screens referred to as
“Scene”
• 1 “Scene” represents 1 View Controller and
Views
• Many “views” can be placed on 1 “scene” (e.g.
buttons, table views, text views). Think of views
7. Storyboard
• Each scene has a dock (displays icons
representing the top-level objects of the
scene)
8. Storyboard
• The “dock” is where we make connections
between code in our View Controller and its
Views (“visual objects on the scene”)
9. View Controllers
• A storyboard displays View Controllers and
corresponding Views visually
10. View Controllers
• A storyboard displays View Controllers and
corresponding Views visually
29. View Controllers
MasterViewController.m
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
[Data removeNoteForKey:[_objects objectAtIndex:indexPath.row]];
[Data saveNotes];
[_objects removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
} else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table
view.
}
}