Open khuong291 opened 8 years ago
:+1: Nice work. The point of this homework was to explore a simple example of a full MVC application with a RESTful API. You learned about UITableViews, custom UITableViewCells, navigation from a UITableView, and basic networking.
bridging-header
file to import AFNetworking
. Just use pod
. If this file is useless, remove it. init() {
}
or you should create the constructor like this (make the parse
func more clear)
init(data: NSDictionary) {
// your code
}
// Movies
let moviesVC = storyboard.instantiateViewControllerWithIdentifier("MediaList") as! MediaListViewController
moviesVC.title = "Movies"
moviesVC.tabBarItem.image = UIImage(named: "superman")?.imageWithRenderingMode(.AlwaysOriginal)
moviesVC.mediaType = .Movie
let moviesNC = UINavigationController(rootViewController: moviesVC)
moviesNC.navigationBar.barTintColor = UIColor.blackColor().colorWithAlphaComponent(0.5)
moviesNC.navigationBar.tintColor = UIColor.yellowColor()
moviesNC.navigationBar.barStyle = UIBarStyle.Black
moviesNC.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.redColor()]
//DVDs
let dvdsVC = storyboard.instantiateViewControllerWithIdentifier("MediaList") as! MediaListViewController
dvdsVC.title = "DVDs"
dvdsVC.tabBarItem.image = UIImage(named: "hulk")?.imageWithRenderingMode(.AlwaysOriginal)
dvdsVC.mediaType = .DVD
let dvdsNC = UINavigationController(rootViewController: dvdsVC)
dvdsNC.navigationBar.barTintColor = UIColor.blackColor().colorWithAlphaComponent(0.5)
dvdsNC.navigationBar.tintColor = UIColor.yellowColor()
dvdsNC.navigationBar.barStyle = UIBarStyle.Black
dvdsNC.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.redColor()]
MediaListViewController
and MediaSearchViewController
? You can use only MediaListViewController
and add UISearchBar
, then implement UISearchBarDelegate
in the view controller.Alamofire
:+1: This helps you request API easier, right?UITextView
to show the synopsis. But you should disable editing of this text. For now, I can edit the synopsis and have no way to dismiss the keyboard.MediaCell.swift
, if you don't implement anything in these functions, remove them.override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
Assets.xcassets
to manage your images.Good submission overall :smile: Homework is the core part of this class. Through the homework assignments you'll create real apps that you should be proud to show anybody. The more time you spend, the better your portfolio will be and the more you will learn. Try to spend a little more time next week!
Here is my completed homework assignment! Thank you /cc @coderschoolreview