Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Intermediate table views

  1. 1. Unit 4—Lesson 6: Intermediate Table Views
  2. 2. Custom table view cells Go beyond the four predefined styles of UITableViewCell objects 
 (Basic, Subtitle, Right Detail, and Left Detail) • Display additional text or buttons • Change the location of cell objects • Add custom row actions • Make your apps stand out
  3. 3. Create a custom subclass Custom table view cells
  4. 4. Static table views
  5. 5. Edit table views .none No control .delete Delete control .insert Insert control
  6. 6. Edit table views 1. tableView(_:canEditRowAt:) (optional) 2. tableView(_:editingStyleForRowAt:) 3. User taps an editing control 4. tableView(_:commit:forRowAt:)
  7. 7. Permit users to add and edit rows Edit table views Use the .insert control on a blank row or Add an Add (+) button to the navigation bar and present a new view controller
 Use the new view controller to permit user edits
  8. 8. Row actions UITableView
  9. 9. Automatic row height tableView.rowHeight = UITableViewAutomaticDimension tableView.estimatedRowHeight = 44.0 Must have properly set constraints on both the top and bottom of the views
  10. 10. Compression resistance
  11. 11. Content hugging priority
  12. 12. Intermediate Table Views Unit 4—Lesson 6 Continue to build on the EmojiDictionary project, creating custom cells to display
  13. 13. Lab: Favorite Books Unit 4—Lesson 6 Implement intermediate table view features into an app that keeps track of your favorite books.
  14. 14. © 2017 Apple Inc. This work is licensed by Apple Inc. under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.

×