Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
c860e88
Add .gitignore
GMinucci Sep 9, 2018
fa1d5df
Add Cocoapods integration
GMinucci Sep 9, 2018
2134c89
Update project folder organization
GMinucci Sep 9, 2018
eabfef5
Merge pull request #1 from GMinucci/proj-setup
GMinucci Sep 9, 2018
c85757d
Add movie list scene
GMinucci Sep 9, 2018
e38eae6
Add movies scene storyboard
GMinucci Sep 9, 2018
c03ab91
Add movies list model
GMinucci Sep 9, 2018
316d7d1
Rename movie list scene
GMinucci Sep 9, 2018
09e375c
Add movie list table view cell
GMinucci Sep 9, 2018
f0727d4
Update movie scene to show mock content
GMinucci Sep 9, 2018
f0612af
Add API integration to list movies
GMinucci Sep 9, 2018
e057b17
Add pagination to movie list
GMinucci Sep 9, 2018
b7a7720
Merge pull request #2 from GMinucci/movie-list
GMinucci Sep 9, 2018
23258f2
Add movie detail scene
GMinucci Sep 9, 2018
4569bf4
Add methods to pass data from movie list to movie detail
GMinucci Sep 9, 2018
036eb69
Add movie detail model object
GMinucci Sep 9, 2018
469e4fc
Add api methods to fetch movie details
GMinucci Sep 9, 2018
00844e8
Add API integration to show movie details
GMinucci Sep 9, 2018
5e0de33
Merge pull request #3 from GMinucci/movie-detail
GMinucci Sep 9, 2018
4e4eb8c
Update navigation bar style
GMinucci Sep 9, 2018
b08800e
Update cell touch animation for movie list
GMinucci Sep 9, 2018
ee55018
Update launch screen
GMinucci Sep 9, 2018
4e6cbe3
Merge pull request #4 from GMinucci/list-layout
GMinucci Sep 9, 2018
78b4cd9
Add heading to movie details
GMinucci Sep 9, 2018
f727ae5
Add label to show movie overview
GMinucci Sep 9, 2018
d2efb7c
Add info table view to movie details
GMinucci Sep 9, 2018
1c0efe6
Update movie info data
GMinucci Sep 9, 2018
0b21530
Update card font sizes
GMinucci Sep 9, 2018
049e687
Add app icon
GMinucci Sep 9, 2018
5dcc653
Remove movie list custom animation
GMinucci Sep 9, 2018
b87ccbb
Refactor movie list cell style
GMinucci Sep 9, 2018
a0a32e3
Merge pull request #5 from GMinucci/detail-layout
GMinucci Sep 9, 2018
8ea8c06
Add movie search scene
GMinucci Sep 9, 2018
e9513f7
Add api integration for movie search
GMinucci Sep 9, 2018
cb92abf
Add methods to open movie detail from search
GMinucci Sep 9, 2018
1e437f0
Add custom loading view extension
GMinucci Sep 9, 2018
f730da4
Update movie details to dynamic height
GMinucci Sep 9, 2018
c2ec2d4
Add share to movie details
GMinucci Sep 9, 2018
36560f3
Add default alert display method
GMinucci Sep 9, 2018
1e50a4b
Improve static url builder for images
GMinucci Sep 9, 2018
2961863
Update movie list to show genres and release date
GMinucci Sep 9, 2018
d9c797d
Update movie search to show genres and release date
GMinucci Sep 9, 2018
49ec9e2
Add user rate starred movies
GMinucci Sep 10, 2018
ce7ae61
Merge pull request #6 from GMinucci/search
GMinucci Sep 10, 2018
8a04675
Add screenshots to project
GMinucci Sep 10, 2018
b8ce216
Update upcoming list screenshot
GMinucci Sep 10, 2018
ade4a33
Update project team
GMinucci Sep 10, 2018
097b36a
Add project readme
GMinucci Sep 10, 2018
078eac5
Update readme file
GMinucci Sep 10, 2018
ba9a420
Update readme file
GMinucci Sep 10, 2018
16d5ee6
Merge pull request #7 from GMinucci/repo-update
GMinucci Sep 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
.DS_Store

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control

Pods/

# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

# iOSInjectionProject/
16 changes: 16 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Global settings
platform :ios, '11.0'
use_frameworks!
inhibit_all_warnings!

target 'TMDb Challenge' do
pod 'PromiseKit', '~> 6.3'
pod 'Alamofire', '~> 4.7'
pod 'Kingfisher', '~> 4.8'

target 'TMDb ChallengeTests' do
inherit! :search_paths
# Pods for testing
end

end
32 changes: 32 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
PODS:
- Alamofire (4.7.3)
- Kingfisher (4.8.1)
- PromiseKit (6.3.4):
- PromiseKit/CorePromise (= 6.3.4)
- PromiseKit/Foundation (= 6.3.4)
- PromiseKit/UIKit (= 6.3.4)
- PromiseKit/CorePromise (6.3.4)
- PromiseKit/Foundation (6.3.4):
- PromiseKit/CorePromise
- PromiseKit/UIKit (6.3.4):
- PromiseKit/CorePromise

DEPENDENCIES:
- Alamofire (~> 4.7)
- Kingfisher (~> 4.8)
- PromiseKit (~> 6.3)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- Alamofire
- Kingfisher
- PromiseKit

SPEC CHECKSUMS:
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
Kingfisher: 868c1149679a7ab6869be118faa9b5aed154aaf0
PromiseKit: e1425568123ec844a944c93f2bcb29d511d39cf5

PODFILE CHECKSUM: 380a1129bf471f9d9d65ad2c19753f484b7bab20

COCOAPODS: 1.5.0
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Upcoming Movies Mobile App

## MOBILE DEV CODE CHALLENGE

This is the source code for the Mobile Dev Code challenge assignment for ArcTouch.

![TMDb-Challenge](https://i.imgur.com/lFZRdrr.png)

## Usage

1. Clone the repository

```
$ git clone git@github.com:GMinucci/TMDb-Challenge.git
$ cd TMDb-Challenge
```

2. Checkout **development** branch

```
$ git checkout origin/development
```

3. Install CocoaPods dependencies

```
$ pod install
```

5. Open the project

```
$ open TMDb\ Challenge.xcworkspace
```

6. Set the development team, compile and run!

## Requirements

* Xcode 9+
* iOS 11+

## Third party libraries

* [Alamofire](https://github.com/Alamofire/Alamofire): Elegant HTTP Networking in Swift
* [PromiseKit](https://github.com/mxcl/PromiseKit): Promises for Swift & ObjC
* [Kingfisher](https://github.com/onevcat/Kingfisher): A lightweight, pure-Swift library for downloading and caching images from the web.
Binary file added Screenshots/Movie Detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Movie Search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Screenshots/Upcoming List.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
464 changes: 440 additions & 24 deletions TMDb Challenge.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions TMDb Challenge.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>TMDb Challenge.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
25 changes: 0 additions & 25 deletions TMDb Challenge/Base.lproj/LaunchScreen.storyboard

This file was deleted.

24 changes: 0 additions & 24 deletions TMDb Challenge/Base.lproj/Main.storyboard

This file was deleted.

72 changes: 72 additions & 0 deletions TMDb Challenge/Components/Cells/MovieInfoTableViewCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
//
// MovieInfoTableViewCell.swift
// TMDb Challenge
//
// Created by Gabriel Minucci on 09/09/18.
// Copyright © 2018 Minucci. All rights reserved.
//

import UIKit

class MovieInfoTableViewCell: UITableViewCell {

static let reuseIdentifier = "MovieInfoTableViewCell"

let titleLabel: UILabel = {
let label = UILabel()
label.setContentHuggingPriority(.defaultHigh, for: .horizontal)
label.textColor = UIColor.tmdb.primaryTextColor
label.font = UIFont.systemFont(ofSize: 16, weight: .medium)
label.translatesAutoresizingMaskIntoConstraints = false
return label
}()

let descriptionLabel: UILabel = {
let label = UILabel()
label.textAlignment = .right
label.numberOfLines = 0
label.setContentHuggingPriority(.defaultHigh, for: .horizontal)
label.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
label.textColor = UIColor.tmdb.secondaryTextColor
label.font = UIFont.systemFont(ofSize: 16, weight: .regular)
label.translatesAutoresizingMaskIntoConstraints = false
return label
}()

override func awakeFromNib() {
super.awakeFromNib()
setupUIComponents()
}

override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUIComponents()
}

required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

private func setupUIComponents() {
backgroundColor = .clear
selectionStyle = .none

addSubview(titleLabel)
titleLabel.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16).isActive = true
titleLabel.topAnchor.constraint(equalTo: topAnchor, constant: 16).isActive = true
titleLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -16).isActive = true

addSubview(descriptionLabel)
descriptionLabel.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -16).isActive = true
descriptionLabel.leadingAnchor.constraint(equalTo: titleLabel.trailingAnchor, constant: 16).isActive = true
descriptionLabel.topAnchor.constraint(equalTo: topAnchor, constant: 16).isActive = true
descriptionLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -16).isActive = true
}

override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)

// Configure the view for the selected state
}

}
57 changes: 57 additions & 0 deletions TMDb Challenge/Components/Cells/MovieListTableViewCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// MovieListTableViewCell.swift
// TMDb Challenge
//
// Created by Gabriel Minucci on 08/09/18.
// Copyright © 2018 Minucci. All rights reserved.
//

import UIKit

class MovieListTableViewCell: UITableViewCell {

static let reuseIdentifier = "MovieListTableViewCell"

let movieDataView: MoviePosterDescriptionView = {
let view = MoviePosterDescriptionView(frame: .zero)
view.backgroundColor = .clear
view.translatesAutoresizingMaskIntoConstraints = false
return view
}()

let starredImageView: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "Star Icon"))
imageView.contentMode = .scaleAspectFit
imageView.translatesAutoresizingMaskIntoConstraints = false
imageView.isHidden = true
return imageView
}()

// Cell initialization
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUIComponents()
}

required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

private func setupUIComponents() {
selectionStyle = .none
backgroundColor = .clear

addSubview(movieDataView)
movieDataView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
movieDataView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true
movieDataView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true
movieDataView.topAnchor.constraint(equalTo: topAnchor).isActive = true

addSubview(starredImageView)
starredImageView.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -16).isActive = true
starredImageView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -16).isActive = true
starredImageView.widthAnchor.constraint(equalToConstant: 60).isActive = true
starredImageView.heightAnchor.constraint(equalToConstant: 60).isActive = true
}

}
Loading