This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the next line to define a global platform for your project | |
platform :ios, '9.0' | |
inhibit_all_warnings! | |
target 'CinemaHub' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
# Pods for CinemaHub | |
pod 'ChameleonFramework', '~> 2.1.0' | |
pod 'BonMot', '~> 4.3.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"page": 1, | |
"total_results": 6452, | |
"total_pages": 323, | |
"results": [ | |
{ | |
"vote_count": 78, | |
"id": 374430, | |
"video": false, | |
"vote_average": 8.8, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
struct APIResults: Decodable { | |
let page: Int | |
let numResults: Int | |
let numPages: Int | |
let movies: [Movie] | |
private enum CodingKeys: String, CodingKey { | |
case page, numResults = "total_results", numPages = "total_pages", movies = "results" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Moya | |
enum MovieApi { | |
case reco(id:Int) | |
case topRated(page:Int) | |
case newMovies(page:Int) | |
case video(id:Int) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import BonMot | |
extension String { | |
func styleTitle() -> NSAttributedString { | |
let style = StringStyle( | |
.font(UIFont(name: "Futura", size: 18)!), | |
.color(UIColor.white) | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol StoryboardIdentifiable { | |
static var storyboardIdentifier: String { get } | |
} | |
extension StoryboardIdentifiable where Self: UIViewController { | |
static var storyboardIdentifier: String { | |
return String(describing: self) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Xcode | |
# | |
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
## Build generated | |
build/ | |
DerivedData/ | |
## Various settings | |
*.pbxuser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func setupView(){ | |
// Background View | |
view.addSubview(bgImageView) | |
bgImageView.snp.makeConstraints{ make in | |
make.edges.equalToSuperview() | |
} | |
// Detail Container View | |
view.addSubview(detailContainer) | |
detailContainer.snp.makeConstraints{ make in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Labels | |
private lazy var timeLabel: UILabel = { | |
let l = UILabel() | |
l.textColor = .white | |
l.font = Theme.fonts.futuraMedium(size: 70) | |
let date = Date() | |
return l | |
}() | |
private lazy var dateLabel: UILabel = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol ReusableView: class {} | |
extension ReusableView { | |
static var reuseIdentifier: String { | |
return String(describing: self) | |
} | |
} |
OlderNewer