Git Product home page Git Product logo

flicks's Introduction

Project 1 - Flicks

Flicks is a movies app using the The Movie Database API.

Time spent: 12 hours spent in total

User Stories

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.

Video Walkthrough

Here's a walkthrough of implemented user stories:

Video Walkthrough

Notes

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.

License

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.

flicks's People

Contributors

lanza avatar

Watchers

 avatar  avatar

flicks's Issues

Project Feedback!

๐Ÿ‘ great job! The point of this homework was to explore a simple example of a full MVC application with a RESTful API. Excellent job tackling many of the optional features. The more optional features you tackle, the more of the framework you'll be able to explore by the end of the class.

Here's a checklist of things that I'm looking for in this project. You should review the checklist, and make any changes to your project, if necessary.

  • Code styling. Check out the Ray Wenderlich Swift Style Guide and the Github Swift Style Guide
  • Using groups to organize your source files. It's pretty common to organize your source files into Groups, especially for larger projects. You can organize by type of class (i.e. View Controllers, Views, etc) or for larger apps by functionality (i.e. Home Screen, Search Screen, etc).
  • Minimize the number of public functions and properties in your classes. You should always try to minimize the number of properties and functions that are public or internal. If unspecified, the scope is internal.
  • Set the Content Mode for your ImageViews. By default the UIContentMode will stretch the image to match the dimensions of the image view, which is probably not what you want. You usually want it set to Aspect Fill with clip subviews.
  • Avoid naming collisions inside of your UITableViewCell. When creating a custom cell make sure to never name a property imageView, titleLabel, or subtitleLabel. Those are already defined by UITableViewCell and using them in your custom cell will cause subtle things to happen such as image views not loading until you click on the cell.
  • Model classes. Creating a Movie model class will allow you move the deserialization code out of the view controller. You should also create a movie property in your custom cell and use a property observer to update the cell's subviews. There are certain libraries like SwiftyJSON that remove the need for a lot of boilerplate code and make it easier to convert from JSON to your model objects. Other popular repositories include Argo, ObjectMapper, and Decodable
  • Next week, we'll cover how to use Auto Layout constraints to implement dynamic height rows and adjust to synopsis of different length.

In general, you should challenge yourself to create visually polished applications. That's where you'll find all the rough edges of the iOS framework and earn the next level of mastery.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.