-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6219e57
commit 6f5c8f5
Showing
56 changed files
with
2,933 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Uncomment the next line to define a global platform for your project | ||
# platform :ios, '9.0' | ||
|
||
target 'themoviedb' do | ||
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | ||
use_frameworks! | ||
|
||
pod 'Moya', '~> 13.0' | ||
pod 'Kingfisher', '~> 5.0' | ||
pod 'RealmSwift' | ||
pod 'SVProgressHUD' | ||
|
||
target 'themoviedbTests' do | ||
inherit! :search_paths | ||
# Pods for testing | ||
end | ||
|
||
target 'themoviedbUITests' do | ||
inherit! :search_paths | ||
# Pods for testing | ||
end | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
PODS: | ||
- Alamofire (4.8.2) | ||
- Kingfisher (5.4.0) | ||
- Moya (13.0.1): | ||
- Moya/Core (= 13.0.1) | ||
- Moya/Core (13.0.1): | ||
- Alamofire (~> 4.1) | ||
- Result (~> 4.1) | ||
- Realm (3.15.0): | ||
- Realm/Headers (= 3.15.0) | ||
- Realm/Headers (3.15.0) | ||
- RealmSwift (3.15.0): | ||
- Realm (= 3.15.0) | ||
- Result (4.1.0) | ||
- SVProgressHUD (2.2.5) | ||
|
||
DEPENDENCIES: | ||
- Kingfisher (~> 5.0) | ||
- Moya (~> 13.0) | ||
- RealmSwift | ||
- SVProgressHUD | ||
|
||
SPEC REPOS: | ||
https://github.com/cocoapods/specs.git: | ||
- Alamofire | ||
- Kingfisher | ||
- Moya | ||
- Realm | ||
- RealmSwift | ||
- Result | ||
- SVProgressHUD | ||
|
||
SPEC CHECKSUMS: | ||
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 | ||
Kingfisher: 9c8f2cc6710334e06f32ba2b45e77707d5e2f0c9 | ||
Moya: f4a4b80ff2f8a4ffc208dfb31cd91636622fee6e | ||
Realm: 9b834e1be6062f544805252c812348872dc5d4ed | ||
RealmSwift: 8a41886f8ab6efef9eb8df97de2f2bb911561a79 | ||
Result: bd966fac789cc6c1563440b348ab2598cc24d5c7 | ||
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 | ||
|
||
PODFILE CHECKSUM: 516ffc03715b16825e7fa7a6b0743fb5bf24641c | ||
|
||
COCOAPODS: 1.6.1 |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
themoviedb.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
themoviedb.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+9.88 KB
...oject.xcworkspace/xcuserdata/alexander.lisovik.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
...edb.xcodeproj/xcuserdata/alexander.lisovik.xcuserdatad/xcschemes/xcschememanagement.plist
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!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>themoviedb.xcscheme_^#shared#^_</key> | ||
<dict> | ||
<key>orderHint</key> | ||
<integer>10</integer> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+118 KB
...viedb.xcworkspace/xcuserdata/alexander.lisovik.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// AppDelegate.swift | ||
// themoviedb | ||
// | ||
// Created by Alexander Lisovik on 5/11/19. | ||
// Copyright © 2019 Alexander Lisovik. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
@UIApplicationMain | ||
class AppDelegate: UIResponder, UIApplicationDelegate { | ||
var window: UIWindow? | ||
|
||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
window = UIWindow(frame: UIScreen.main.bounds) | ||
window?.rootViewController = UINavigationController(rootViewController: TabBarViewController()) | ||
window?.makeKeyAndVisible() | ||
|
||
return true | ||
} | ||
|
||
func applicationWillResignActive(_ application: UIApplication) { | ||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. | ||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. | ||
} | ||
|
||
func applicationDidEnterBackground(_ application: UIApplication) { | ||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. | ||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | ||
} | ||
|
||
func applicationWillEnterForeground(_ application: UIApplication) { | ||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. | ||
} | ||
|
||
func applicationDidBecomeActive(_ application: UIApplication) { | ||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | ||
} | ||
|
||
func applicationWillTerminate(_ application: UIApplication) { | ||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | ||
} | ||
|
||
|
||
} | ||
|
98 changes: 98 additions & 0 deletions
98
themoviedb/Assets.xcassets/AppIcon.appiconset/Contents.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "20x20", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "20x20", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "29x29", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "29x29", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "40x40", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "40x40", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "60x60", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"size" : "60x60", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "20x20", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "20x20", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "29x29", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "29x29", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "40x40", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "40x40", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "76x76", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "76x76", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "ipad", | ||
"size" : "83.5x83.5", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "ios-marketing", | ||
"size" : "1024x1024", | ||
"scale" : "1x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="EHf-IW-A2E"> | ||
<objects> | ||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="53" y="375"/> | ||
</scene> | ||
</scenes> | ||
</document> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// BaseViewController.swift | ||
// themoviedb | ||
// | ||
// Created by Alexander Lisovik on 5/13/19. | ||
// Copyright © 2019 Alexander Lisovik. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class BaseViewController<P: Presenter>: UIViewController { | ||
public var presenter: P | ||
|
||
public init(presenter: P) { | ||
self.presenter = presenter | ||
super.init(nibName: nil, bundle: nil) | ||
} | ||
|
||
public required init?(coder aDecoder: NSCoder) { | ||
fatalError("not implemented") | ||
} | ||
|
||
override func loadView() { | ||
self.view = UIView(frame: UIScreen.main.bounds) | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
presenter.didBindController() | ||
} | ||
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
presenter.viewWillAppear() | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Presenter.swift | ||
// themoviedb | ||
// | ||
// Created by Alexander Lisovik on 5/13/19. | ||
// Copyright © 2019 Alexander Lisovik. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol Presenter { | ||
func didBindController() | ||
func viewWillAppear() | ||
} | ||
|
||
extension Presenter { | ||
func viewWillAppear() {} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// XibLoadable.swift | ||
// themoviedb | ||
// | ||
// Created by Alexander Lisovik on 5/13/19. | ||
// Copyright © 2019 Alexander Lisovik. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import Foundation | ||
|
||
// MARK: - XibLoadable | ||
public protocol XibLoadable { | ||
static var xibName: String { get } | ||
} | ||
|
||
public extension XibLoadable { | ||
static func nib(bundle: Bundle? = nil) -> UINib { | ||
return UINib(nibName: xibName, bundle: bundle) | ||
} | ||
} | ||
|
||
public extension XibLoadable where Self: UIView { | ||
static var xibName: String { | ||
return String(describing: self) | ||
} | ||
|
||
static func loadViewFromXib() -> Self { | ||
let nib = self.nib(bundle: Bundle(for: Self.self)) | ||
guard let view = nib.instantiate(withOwner: nil, options: nil).first as? Self else { | ||
fatalError("The nib \(nib) expected its root view to be of type \(self)") | ||
} | ||
return view | ||
} | ||
} |
Oops, something went wrong.