FakeNews is a news app similar to Apple's 'News' App in iOS. The goal of this assignment is to practice UITableView
and UITableViewController
.
Avg. time to develop (beginners): 2-3 hours
- Create a new iOS project
- Save it as
FakeNews
- Download these images and save them to your assets folder on your XCode project.
Make an app similar to Apple's News app. The HomeTableViewController
displays random news with random layouts. Some UITableViewCell
s take user to the DetailTableViewController
. Feel free to use Apple's News app as a guide along with the video walkthrough above.
Important Note: Make sure to design this entire app in STATIC UITableView
and not dynamic.
Top | Bottom |
---|---|
- Contains a total of 5 cells:
- Row 0: Date on the left side, FakeNews Logo on the right side
- Row 1: Second cell: Large
UIImageView
with a news company logoUIImageView
underneeth that image. Also contains aUILabel
to display title for the article. - Row 2: Third cell: Contains two
UIImageView
s as well asUILabel
s side-by-side. - Row 3:
UILabel
on the left and aUIImageView
on the right. Also includeUIImageView
on top of theUILabel
to display news logo - Row 4: Same as Row 3
- Non-selectable cells: Row 0 & @ Row 2
- Selectable cells: Row 1, Row 3, Row 4
- Tapping on Row 1, 3 & 4 should take you to
DetailTableViewController
. - Make sure to design this app. Click here for design tips.
- Contains 3 cells:
- Row 0: Headline
UIlabel
- Row 1: Large
UIImageView
to display article's image - Row 3: Large
UILabel
for article's text
- Row 0: Headline
- When creating a code ViewController, make sure that it's a subclass of
UITableViewController
.
- Change
DetailTableViewController
's properties fromHomeTableViewController
:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// ...
}
- There should be 3 segues:
- Don't forget to set unique identifier for each segue on the attribute inspector.