You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The point of this project was to explore an example of a full MVC application that reads and writes from a RESTful API. Many iOS apps follow the basic structure of the Twitter app that you built this week. Usually, it's not a public API, but it's a private API, e.g., the private Airbnb or Postmates API.
Here are some general things that you can read through to evaluate your implemenation:
Did you minimize the number of public functions and properties in your classes? You should always try to minimize the number of properties and functions that are public or internal. This is a coding best practice.
Is your TweetsViewController generic enough that it can be reused to display tweets from other Twitter endpoints? A view controller that displays a list of tweets is the type of view controller that you want to make generic enough that it can be used in multiple places throughout an app. This particular TweetsViewController can come in handy for displaying the user's home timeline, but can also be reused for displaying a list of tweets that mention the particular user, showing another user's timeline, etc.
Did you properly handle the conditionally present label "retweeted by..." in your custom TweetCell? You'll notice that for some tweets you'll need to display the "retweeted by..." label and have this hidden for other tweets. You'll want to create an outlet for a top margin AutoLayout constraint and modify the constant depending on whether you want to show the label or not.
Another common approach for implementing model classes Having model classes for both Tweets and Users and being able to initialize each one from a json dictionary makes it easier to handle the Twitter network response and turn it into model objects that can be reused throughout your app. It's also a good idea to check out libraries like Mantle which reduce the boilerplate code you need to implement these model classes.
Did you handle reply/retweet/favorite actions from within the TweetCell? This is an example where it's useful for your model to be able to handle network actions, so you can simply wire up the buttons to a method like [tweet retweet]. You can even pass in an optional block if you want to handle a failure of the network event.
Did you immediately update the retweet and favorite counts when a user retweets or favorites a tweet? It's common practice when building an app to have actions like favoriting a tweet assume network success and ignore any failures. This gives the user an immediate response to his/her action without having to wait for a network response.
Did you share code between your ProfileViewController and TimelineViewController? The ProfileViewController and the TimelineViewController both contain a feed of tweets. There are three general strategies: you can have a single view controller that conditionally has the profile header, you can create the ProfileViewController as a subclass of the TimelineViewController, or you can create a separate class called a TimelineController (not a view controller). TimelineController is a dataSource and a delegate to a UITableView and knows how to show a feed of tweets.
Each Storyboard scene should have Auto Layout constraints specified for each view. There should be no yellow Auto Layout warnings, even if the layout seems to work. Auto Layout warnings are like having bad HTML. The browser will try to render it, and it might even look right, but it won't be fully predictable.
The text was updated successfully, but these errors were encountered:
The point of this project was to explore an example of a full MVC application that reads and writes from a RESTful API. Many iOS apps follow the basic structure of the Twitter app that you built this week. Usually, it's not a public API, but it's a private API, e.g., the private Airbnb or Postmates API.
Here are some general things that you can read through to evaluate your implemenation:
[tweet retweet]
. You can even pass in an optional block if you want to handle a failure of the network event.ProfileViewController
and theTimelineViewController
both contain a feed of tweets. There are three general strategies: you can have a single view controller that conditionally has the profile header, you can create the ProfileViewController as a subclass of the TimelineViewController, or you can create a separate class called a TimelineController (not a view controller). TimelineController is a dataSource and a delegate to a UITableView and knows how to show a feed of tweets.The text was updated successfully, but these errors were encountered: