Filling In the Table
Let’s think about how we’re going to go from this to a table of real tweets. Since the table can demand the contents of any row at any time, we’ll want to have a data structure representing all the tweets that we want to show in the table. This doesn’t have to be anything fancy; in fact, an array will do just fine.
But an array of what? Well, one approach would be to just create a data type including the parts of a tweet we care about—its text, the screen name of the person who sent it, and so forth—and then have an array of those objects.
Since starting the PragmaticTweets example, we’ve been dealing almost exclusively in classes, because that’s what we inherit from the iOS SDK: we subclassed UIViewController to handle ...
Get iOS 9 SDK Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.