Flicks is a movies app using the The Movie Database API.
Time spent: 12 hours spent in total
The following required functionality is completed:
- User can view a list of movies currently playing in theaters. Poster images load asynchronously.
- User can view movie details by tapping on a cell.
- User sees loading state while waiting for the API.
- User sees an error message when there is a network error.
- User can pull to refresh the movie list.
The following optional features are implemented:
- Add a tab bar for Now Playing and Top Rated movies.
- Implement segmented control to switch between list view and grid view.
- Add a search bar.
- All images fade in.
- For the large poster, load the low-res image first, switch to high-res when complete.
- Customize the highlight and selection effect of the cell.
- Customize the navigation bar.
The following additional features are implemented:
- As you reach the bottom of the
UIScrollView
within the table/collection view, more movies are fetchd to make the display continuous.
Here's a walkthrough of implemented user stories:
I implemented the entire project without Storyboards and thus had to deal with a TON of intracicies that I did not know about regarding setting up various UIKit elements programmatically. A few quick examples are that UIViewControllers
have an automatic inset added to UIScrollViews
that are subviews of view
or view
itself. However, there are various things that break this functionality that didn't really seem to make much sense.
Another issue I ran into was that I started the project with a class MoviesTVC
as a UITableViewController
subclass to display the list of movies. When the UISegmentedControl
was to be implemented, I instead chose to implement a UICollectionViewController
subclass as well. First, you can't use a parent class to save yourself the duplicated code since you can't redefine the subclasses of UITableViewController
or UICollectionViewController
. I instead tried to use protocols to capture the duplicated code but I ran into some problems where somethings required the protocol to be @objc
while others would not work with @objc
. In order to make it work, I'd have to make multiple protocols to capture all this. So I quit that path and eventually just made a UIViewController
whose view
had both a collection and table view.
Copyright [2016] [Nathan Lanza]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.