#17 in Apple programming books
Use arrows to jump to the previous/next product
Reddit mentions of iOS 5 Programming Pushing the Limits: Developing Extraordinary Mobile Apps for Apple iPhone, iPad, and iPod Touch
Sentiment score: -1
Reddit mentions: 1
We found 1 Reddit mentions of iOS 5 Programming Pushing the Limits: Developing Extraordinary Mobile Apps for Apple iPhone, iPad, and iPod Touch. Here are the top ones.
Buying options
View on Amazon.comor
- 120V 30W Soldering Iron w/ 0.6mm Rosin Core Solder (12.5g Tube)
- 30W Soldering Iron: Cord Length: 58" • Ceramic heater • Stainless steel tip
- Rosin flux cored solder serves the same purpose of flux; it removes oxides and other unwanted impurities from copper tracks on printed circuit boards and from the surface of electronic component leads
Features:
Specs:
Height | 9.299194 Inches |
Length | 7.40156 Inches |
Number of items | 1 |
Weight | 1.62260224832 Pounds |
Width | 0.79917163 Inches |
The argument is to treat your UITableViewCell as the "Controller" in this scenario. Understanding composition correctly is the key here.
In classical MVC, an object (controller or model or view) should not know about details of a contained (composited) object. For example,
if you have a model "Person" that has a
Person
Accessing something like self.person.manager.dob from any class is probably not a good idea.
By making the "PersonList"ViewController access details of a single person shoving it into the cell, (in the cellForRowAtIndexPath method) you precisely do this.
This also happens to bloat the "PersonList"ViewController because now this "PersonList"ViewController does the job of both a "Person"ViewController and a "PersonList"ViewController.
By delegating this task to another object (in this case, it happens to be PersonTableViewCell), you help yourself by avoiding the dreaded massive view controller problem.
"
Most iOS developers often think of UIViewController as the "C" and UITableViewCell as the "V" in MVC. My heuristic is, generic table view cells (UITableViewCell used as is) should be treated as a view. But if you write a custom subclass of a UITableViewCell, it is probably a controller because you are not writing cell drawing/rendering code. This is precisely what we wrote in the iOS 5 Programming Pushing the Limits book (Page 95) https://www.amazon.com/dp/1119961327/