Most iOS apps use one or more UITableViews for at least some portion of their user interface. Unfortunately, UITableViewController code can often be home to monstrous if/else constructs employed to handle cell configuration and user interaction. This talk will illustrate the typical issues encountered with table view code. Whether form-like table views with a fixed number of rows, such as those found in settings views or those used to edit object data, or dynamic tables with multiple sections and rows within each section, you'll learn how to produce concise, readable, and powerful code.
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
UITableView Pain Points
1. LEGAL: This document may contain trademarked logos, intellectual property, and confidential information. If you are not the intended
recipient or an authorized agent, then this is notice to you that the dissemination, distribution or copying this document is prohibited.
Table View
Pain Points
Ken Auer
ken.auer@rolemodelsoftware.com
@kauerrolemodel
2. LEGAL: This document may contain trademarked logos, intellectual property, and confidential information. If you are not the intended
recipient or an authorized agent, then this is notice to you that the dissemination, distribution or copying this document is prohibited.
Section
The Missing Object
30. LEGAL: This document may contain trademarked logos, intellectual property, and confidential information. If you are not the intended
recipient or an authorized agent, then this is notice to you that the dissemination, distribution or copying this document is prohibited.
So What About
Handling Selections?
RMSTableViews
https://github.com/RoleModel/RMSTableViews
37. Sections Were Missing, but…
• In a dynamic table, they just about
always do the same thing
• Identify the represented objects
• Provide the cell
• The cell is unique
• Don’t put the intelligence in the
Section, but in the Cell
41. LEGAL: This document may contain trademarked logos, intellectual property, and confidential information. If you are not the intended
recipient or an authorized agent, then this is notice to you that the dissemination, distribution or copying this document is prohibited.
So What About The
“Form View”?
Data editing, Settings views…
42. The Form Descriptor
•Defines the structure of a form
•Can be expressed in code, as a Plist, or JSON
•Consists of an array of section dictionaries
•Section dictionaries specify section properties
and contain an array of “row” dictionaries
•Row dictionaries describe cells
50. Top level
items describe
Sections
Rows in
Sections
describe Cells
Various
Generic Form
Cells already
available
Things that
don’t go well in Plists
can identify key to have
controller interpret &
substitute
53. - (NSArray *)generateSections {
NSMutableArray *sections = [NSMutableArray array];
!
for (NSDictionary *rawSection in self.descriptor) {
/* Sections and Cells are built here */
}
return sections;
}
The form descriptor drives the construction
of the table view
72. Summary
• TableViews often require much tedium
when not in the simplest form
• Code becomes hard to parse
73. Summary
• TableViews often require much tedium
when not in the simplest form
• Code becomes hard to parse
• Few interesting things happening
(mostly tying objects to the right cells)
74. Summary
• TableViews often require much tedium
when not in the simplest form
• Code becomes hard to parse
• Few interesting things happening
(mostly tying objects to the right cells)
• Sections are objects that are implied
but missing from the Object Model
75. Summary
• TableViews often require much tedium
when not in the simplest form
• Code becomes hard to parse
• Few interesting things happening
(mostly tying objects to the right cells)
• Sections are objects that are implied
but missing from the Object Model
• Make Cells more intelligent about the
objects they represent
76. LEGAL: This document may contain trademarked logos, intellectual property, and confidential information. If you are not the intended
recipient or an authorized agent, then this is notice to you that the dissemination, distribution or copying this document is prohibited.
UITableView
Pain Reliever
https://github.com/RoleModel/RMSTableViews
Ken Auer
ken.auer@rolemodelsoftware.com
@kauerrolemodel
Tony Ingraldi
tony.ingraldi@rolemodelsoftware.com
Available as a CocoaPod, docs on cocoadocs.org