Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thursday lab #7

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

Thursday lab #7

wants to merge 33 commits into from

Conversation

robert-hatfield
Copy link
Owner

Incomplete at this time; I'm still working on meeting technical requirements of the assignment.

…rror handling

I ran into an error 403 due to an old password stored in iOS settings. Added an explicit case at Adam's recommendation.
With a lot assistance from TAs... I need to review this to ensure I understand how it is implemented.
Passing the selected Tweet object to the next content view controller.
This was done in the storyboard by setting lineBreakMode to "wordWrap".
Passing the User object, since we will also want other attributes (profile image, and perhaps the user's location) to be displayed in the main timeline.
Incomplete - the segue is there but crashes to Springboard when loaded. I may not be passing the right User object type to the controller.
Removed an orphaned outlet in Storyboard that was causing a crash.
I'll probably need to move the call to capture the profile info for the currently logged in profile (the _application_ user).
IBOutlets needed to be connected to individual components of the view, rather than the view itself.
I've also renamed the label for Twitter user's name, which isn't the same as the screen name.
This isn't wired up yet - but it will invisibly overlay the tweet author's details so you can then view their timeline.
@robert-hatfield
Copy link
Owner Author

robert-hatfield commented Mar 24, 2017

Technical Requirements

  • In TweetDetailViewController.swift:
    • Have an imageView that shows the user's profile image.
    • Have 2 labels for the Username and TweetText.
    • Create a View Feed button.
  • When the View Feed button is clicked, the user should segue to a 3rd view controller that will show that user's timeline. The api url is "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=" but you will need to ensure that you pass in the username as a parameter to this url.
  • Convert your UITableViewCell subclass(TweetCell) to use a Nib, so you can share the same cell for both the HomeTimelineViewController and the UserTimelineViewController.
  • Import an image asset into the asset catalog with the appropriate corresponding image sizes.
  • Implement a UITableViewHeaderView on your ViewController.swift that displays the image added to the asset catalog.

Stretch Goals

  • Implement a SimpleCache class to check and see if an image you are about to download is already downloaded before doing a network call. If the image exists in the cache, use it, if not, fetch it from Twitter.
  • Refactor your code to use a single TimelineViewController instead of having multiple view controllers doing the same thing presenting a tableView of tweets. This will allow you to create seemingly endless navigation when selecting individual tweets.
    • HINT: I would recommend first finding the similarities between the 2 viewControllers, then create a single subclass to manage the logic of these commonalities. Then, if needed, create another subclass from this that will handle the individual logic of the HomeTimelineViewController that will show the user's home timeline of tweets.

@robert-hatfield
Copy link
Owner Author

Selected user timeline is now functional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant