/Twitter

CodePath iOS assignment using the Twitter API

Primary LanguageSwift

CodePath Week 3: Twitter

This is a basic Twitter client that uses the Twitter API to read and compose tweets. It's also the assignment for Week 3 of the CodePath iOS for Engineers class for Fall 2015, built with Xcode 7.0 and Swift.

Last week, the screen from my 2012 laptop broke and had to be replaced. So this week's episode was viewed on a new screen with over 4 million functional pixels ("Retina Display"). More hours staring at a screen with eyes that need corrective lenses! For this homework, I prioritized Twitter features related to reading tweets. Because relatively few people actively interact with tweets in real life (and of course they can use the official Twitter app for that).

Time spent: 16 hours

Required Features

  • User can sign in using OAuth login flow
  • User can view last 20 tweets from their home timeline
  • The current signed in user will be persisted across restarts
  • In the home timeline, user can view tweet with the user profile picture, username, tweet text, and timestamp. In other words, design the custom cell with the proper Auto Layout settings. You will also need to augment the model classes.
  • User can pull to refresh
  • User can compose a new tweet by tapping on a compose button.
  • User can tap on a tweet to view it, with controls to retweet, favorite, and reply.

Optional Features

  • 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 load more tweets once they reach the bottom of the feed using infinite loading similar to the actual Twitter client.

Bonus Features

  • I got really annoyed at how links couldn't actually click through to read content. So made that happen in the detail view, along with coloring those links in blue. (The coloring part was harder than it sounds.)
  • Twitter can load up to 200 tweets at a time (not just 20). For ease of infinite scrolling, the demo is configured to load 25 tweets at a time.

Walkthrough

Video Walkthrough

Credits