Code Monkey home page Code Monkey logo

fbu_ios_twitter_objc-starter-project's Introduction

Twitter

Project 3 - Twitter

Twitter is a basic twitter app to read and compose tweets the Twitter API.

Time spent: 25 hours spent in total

User Stories

The following required functionality is completed:

  • User sees app icon in home screen and styled launch screen
  • User can sign in using OAuth login flow
  • User can Logout
  • User can view last 20 tweets from their home timeline
  • In the home timeline, user can view tweet with the user profile picture, username, tweet text, and timestamp.
  • User can pull to refresh.
  • User can tap the retweet and favorite buttons in a tweet cell to retweet and/or favorite a tweet.
  • User can compose a new tweet by tapping on a compose button.
  • Using AutoLayout, the Tweet cell should adjust its layout for iPhone 11, Pro and SE device sizes as well as accommodate device rotation.
  • User should display the relative timestamp for each tweet "8m", "7h"
  • Tweet Details Page: User can tap on a tweet to view it, with controls to retweet, favorite, and reply.

The following stretch features are implemented:

  • User can view their profile in a profile tab
    • Contains the user header view: picture and tagline
    • Contains a section with the users basic stats: # tweets, # following, # followers
    • Profile view should include that user's timeline
  • User should be able to unretweet and unfavorite and should decrement the retweet and favorite count. Refer to [[this guide|unretweeting]] for help on implementing unretweeting.
  • Links in tweets are clickable.
  • User can tap the profile image in any tweet to see another user's profile
    • Contains the user header view: picture and tagline
    • Contains a section with the users basic stats: # tweets, # following, # followers
  • User can load more tweets once they reach the bottom of the feed using infinite loading similar to the actual Twitter client.
  • When composing, you should have a countdown for the number of characters remaining for the tweet (out of 280) (1 point)
  • After creating a new tweet, a user should be able to view it in the timeline immediately without refetching the timeline from the network.
  • User can reply to any tweet, and replies should be prefixed with the username and the reply_id should be set when posting the tweet (2 points)
  • User sees embedded images in tweet if available
  • User can switch between timeline, mentions, or profile view through a tab bar (3 points)
  • Profile Page: pulling down the profile page should blur and resize the header image. (4 points)

The following additional features are implemented:

  • List anything else that you can get done to improve the app functionality!

Please list two areas of the assignment you'd like to discuss further with your peers during the next class (examples include better ways to implement something, how to extend your app in certain ways, etc):

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

Notes

Describe any challenges encountered while building the app.

Credits

List an 3rd party libraries, icons, graphics, or other assets you used in your app.

License

fbu_ios_twitter_objc-starter-project's People

Contributors

lekan2001 avatar

Watchers

 avatar

fbu_ios_twitter_objc-starter-project's Issues

Project Feedback!

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.