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
protocol PropertyLoopable | |
{ | |
func allProperties() throws -> [String: Any] | |
} | |
extension PropertyLoopable | |
{ | |
func allProperties() throws -> [String: Any] { |
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
print(CFGetRetainCount(object)) |
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
//////// | |
/// 11:55 | |
/// ONE and ONE are all equal. | |
/// FIVE and FIVE fingers all have. | |
/// Humanity is but god’s hand. | |
/// | |
/// The lips of wisdom are open. | |
/// The mirror will soon awake. | |
/// The time for unity is now. |
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 RxDataSources | |
struct MoviesSection { | |
var header:String | |
var items:[Item] | |
var uniqueId: String = "Trending" | |
} |
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 ObjectMapper | |
import SwiftDate | |
import RxDataSources | |
struct Genre : Mappable, Codable{ | |
var id:String? | |
var idInt:Int? | |
var name:String? |
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 Delayed | |
import RxSwift | |
import RxCocoa | |
import RxDataSources | |
protocol MoviesCollectionViewProtocol:AnyObject { | |
func didSelect(movie : Movie) //todo pass selected index and/or object | |
} |
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 | |
enum APIEndpoints { | |
case getMovie(String) | |
case getMovieRelated(String) | |
case getTrendingMovies(Int) | |
func url()->String{ | |
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 RxSwift | |
import Alamofire | |
import AlamofireObjectMapper | |
extension Reactive where Base:APIService{ | |
func call<K:APIResponse>(_ endpoint : APIEndpoints) -> Single<K> { | |
return Single<K>.create { single 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
import UIKit | |
import ObjectMapper | |
protocol APIResponse { | |
func items<K>(_ type:K.Type? )->[K] | |
} | |
extension APIResponse{ | |
func items<K>(_ type:K.Type? = nil)->[K]{ | |
return ([self] as? [K]) ?? [] |
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 Alamofire | |
import AlamofireObjectMapper | |
import ObjectMapper | |
typealias APIClosure<K> = (K?)->Void | |
class APIService: NSObject { | |
static let API_KEY_V3 = "SECRET_KEY" |
OlderNewer