Dual-layout iOS movie browser that presents TMDb's now-playing list as a
UITableViewand a superhero genre grid as aUICollectionView, loading all poster images via URLSession + NSCache| Layer | Technology | |---|---| | Language | Swift 6.0 | | UI | UIKit, UITableView, UICollectionView, UICollectionViewFlowLayout, Auto Layout | | Image Loading | URLSession + NSCache| | Networking | URLSession (dataTask with JSONSerialization) | | API | TMDb v3 (/movie/now_playing,/movie/{id}/similar) | | Dependencies | CocoaPods |
A UITabBarController presents NowPlayingViewController (table layout) and SuperheroViewController (collection grid layout) as sibling tabs. Both view controllers fetch independently via URLSession.dataTask and hold their own movies: [[String: Any]] arrays. Tapping any row or cell passes the corresponding dictionary to DetailViewController through a storyboard segue. MovieApiManager is defined as a reusable service layer but view controllers currently call URLSession directly, keeping the networking path straightforward.
UICollectionViewFlowLayout sizing at runtime: SuperheroViewController.viewDidLoad casts the layout to UICollectionViewFlowLayout, sets minimumInteritemSpacing and minimumLineSpacing to 5 points, then derives itemSize from collectionView.frame.size.width to produce exactly three columns regardless of device width — no hardcoded point values.
loadImage(from: request deduplication: URLSession + NSCache
