GithubHelp home page GithubHelp logo

andrea-io / flixster Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 428 KB

A movies iOS app using the The Movie Database API

Objective-C 98.49% Ruby 1.51%
app-development ios ios-app-development objective-c tmdb-api

flixster's Introduction

Project 1 - Flixster

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

Time spent: 10 hours spent in total

User Stories

The following required functionality is complete:

  • User sees an app icon on the home screen and a styled launch screen.
  • User can view a list of movies currently playing in theaters from The Movie Database.
  • Poster images are loaded using the UIImageView category in the AFNetworking library.
  • User sees a loading state while waiting for the movies API.
  • User can pull to refresh the movie list.
  • User sees an error message when there's a networking error.
  • User can tap a tab bar button to view a grid layout of Movie Posters using a CollectionView.

The following optional features are implemented:

  • User can tap a poster in the collection view to see a detail screen of that movie
  • User can search for a movie.
  • All images fade in as they are loading.
  • User can view the large movie poster by tapping on a cell.
  • For the large poster, load the low resolution image first and then switch to the high resolution image when complete.
  • Customize the selection effect of the cell.
  • Customize the navigation bar.
  • Customize the UI.
  • Run your app on a real device.

The following additional features are implemented:

  • List anything else that you can get done to improve the app functionality!

Please list two areas of the assignment you'd like to discuss further with your peers during the next class (examples include better ways to implement something, how to extend your app in certain ways, etc):

Video Walkthrough

Here's a walkthrough of implemented user stories:

Notes

Describe any challenges encountered while building the app.

Credits

List an 3rd party libraries, icons, graphics, or other assets you used in your app.

License

Copyright [2022] [Andrea Gonzalez]

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.

flixster's People

Watchers

 avatar

flixster's Issues

Project Feedback!

We have graded your work, and it looks like the following features are not reflected on your GIF walkthrough:

  • User sees an error message when there's a networking error.

The GIF helps us to make sure we don't miss any required or optional stories you have completed. We highly suggest that you provide us with a GIF that completely shows all the features you have implemented.

Feedback

When I tap on a cell in MovieViewController, your app crashes. You could fix this crash by providing a cell identifier. You did not need a table view in your detail screen though.

Style

This is a good reference for coding style: https://github.com/NYTimes/objective-c-style-guide

Class name and File names should start with Capital Letters.

movieCell should be renamed to MovieCell

Properties and local variables MUST be camel-case with the leading word being lowercase. โœ…

Properties should be accessed using self.propertyName instead of _propertyName. โœ…

Movie Details View Controller

Your movie details view controller did not have to be a table view. You could of passed in a movie dictionary from your MovieViewController to your DetailsViewController.

Instead of having a table view, you could of just had these outlets in your DetailsViewController

@property (strong, nonatomic) IBOutlet UIImageView *posterImageView;
@property (strong, nonatomic) IBOutlet UILabel *synopsisLabel;
@property (strong, nonatomic) IBOutlet UILabel *titleLabel;

In your viewDidLoad method in your DetailsViewController, you could of just configured your outlets.

Reusing your details view controller

Think about how you can reuse the same detail view controller when you tap on a cell in your collection view.

Reusing your functions

You already refactored your network code into - (void)beginRefresh:(UIRefreshControl *)refreshControl function. You should think about how you can reuse that function instead of having duplicate network code.

Commit Messages

Commit messages should follow these guidelines: https://cbea.ms/git-commit/

Since this is the first project, I do not expect you to have good commits messages, but in the future, please add a commit for every feature.

Logging

You should be logging every function in your application. This will help you understand your function call order. In production app, you'll likely be logging errors and crashes. You will also be tracking every user action.

NSLog(@"%@", NSStringFromSelector(_cmd));

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"%@", NSStringFromSelector(_cmd));
}

I personally add my initials to my log messages on my personal projects because it makes it easy for me to filter because you will receive log messages from various places.

My log messages look like this:
NSLog(@":NC: %@", NSStringFromSelector(_cmd));

UITableViewDelegate

You could also use UITableViewDelegate to navigate to details screen instead of segues.

Step 1

Conform to the UITableViewDelegate

@interface MovieViewController () <UITableViewDataSource, UITableViewDelegate>

You'll also need to specify to the table view who the delegate is which is similar to how you specified to the table view who the data source was.

    self.tableView.dataSource = self;
    self.tableView.delegate = self;

Step 2

Implement didSelectRowAtIndexPath method of UITableViewDelegate interface.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
}

Step 3

Add a storyboard id for your details view controller

Screen Shot 2022-06-19 at 12 31 03 PM

Step 4

You will instantiate your view controller from storyboard and push it with your navigation controller. Navigation Controller will be nil if you did not embed your view controller in a navigation controller in storyboard.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UINavigationController *navigationController = self.navigationController;
    MovieDetailsViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"MovieDetailsViewController"];
    viewController.movie = self.movies[indexPath.row];
    [navigationController pushViewController: viewController animated:YES];
}

Project Feedback!

Nice work! The purpose of this project was to continue learning Objective-C and the Cocoa Touch (iOS) framework. You should be comfortable creating table views (one of the most common views in iOS) and working with array of dictionaries created from JSON (in this case from the Movies Database API).

A key part of these projects is that you work to polish the visuals and the small UI / UX touches. Developing your design sense is an important part of being a mobile engineer. You'll find that perfecting the UI / UX will often lead to interesting technical challenges as well because the libraries may not behave exactly as you want them to, so you'll have to learn how to achieve the effect that you want. A few other things to note:

  • Did you use 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).
  • Did you minimize the number of public methods and properties in your classes? You should always try to minimize the number of properties and methods that are in the header files. Only expose what you have to, e.g., properties and methods that must be accessed by other classes.
  • Did you properly 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. The most common combination is to use Aspect Fill combined with clipping subviews.

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.