Skip to content

Commit

Permalink
Fix issue with moving table view text.
Browse files Browse the repository at this point in the history
- added higher quality placeholder image that wont shift text
  • Loading branch information
Brent Mifsud committed Jun 2, 2019
1 parent fb367e1 commit 5f31cfb
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
"images" : [
{
"idiom" : "universal",
"filename" : "film_512.png",
"filename" : "Screen Shot 2019-06-01 at 5.33.23 PM.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "film_512-1.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "film_512-2.png",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion TheMovieManager/Controller/FavoritesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extension FavoritesViewController: UITableViewDataSource, UITableViewDelegate {
let movie = MovieModel.favorites[indexPath.row]

cell.textLabel?.text = movie.title
cell.imageView?.image = UIImage(named: "PosterPlaceholder")
cell.imageView?.image = UIImage(named: "MoviePlaceholder")

if let posterPath = movie.posterPath {
TMDBClient.downloadPosterImage(posterPath: posterPath) { (data, error) in
Expand Down
6 changes: 4 additions & 2 deletions TheMovieManager/Controller/MovieDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ class MovieDetailViewController: UIViewController {
super.viewDidLoad()

navigationItem.title = movie.title
imageView.image = UIImage(named: "PosterPlaceholder")
imageView.image = UIImage(named: "MoviePlaceholder")

TMDBClient.downloadPosterImage(posterPath: movie.posterPath ?? "", completion: handlePosterImageResponse(data:error:))
if let posterPath = movie.posterPath {
TMDBClient.downloadPosterImage(posterPath: posterPath, completion: handlePosterImageResponse(data:error:))
}

toggleBarButton(watchlistBarButtonItem, enabled: isWatchlist)
toggleBarButton(favoriteBarButtonItem, enabled: isFavorite)
Expand Down
2 changes: 1 addition & 1 deletion TheMovieManager/Controller/SearchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ extension SearchViewController: UITableViewDataSource, UITableViewDelegate {
cell.textLabel?.text?.append(" - \(movie.releaseYear)")
}

cell.imageView?.image = UIImage(named: "PosterPlaceholder")
cell.imageView?.image = UIImage(named: "MoviePlaceholder")

if let posterPath = movie.posterPath {
TMDBClient.downloadPosterImage(posterPath: posterPath) { (data, error) in
Expand Down
2 changes: 1 addition & 1 deletion TheMovieManager/Controller/WatchlistViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension WatchlistViewController: UITableViewDataSource, UITableViewDelegate {
let movie = MovieModel.watchlist[indexPath.row]

cell.textLabel?.text = movie.title
cell.imageView?.image = UIImage(named: "PosterPlaceholder")
cell.imageView?.image = UIImage(named: "MoviePlaceholder")

if let posterPath = movie.posterPath {
TMDBClient.downloadPosterImage(posterPath: posterPath) { (data, error) in
Expand Down

0 comments on commit 5f31cfb

Please sign in to comment.