class MyAppCantFunctionUnlessBothPropertiesAreBloodyPresent {
var cloudId: String?
var apnsToken: String?
func pleaseJustSendThisShitToMyServerSoICanBeDoneWith() {
guard let cloudId = self.cloudId, apnsToken = self.apnsToken else {
print(“Sighs, nope not ready yet, we’re all probably waiting for that blaady apns token again")
return
}
print(“what took you two so long? Let’s make that request to igors server now")
This file contains hidden or 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 UIKit | |
public protocol CellRepresentable { | |
static func registerCell(tableView: UITableView) | |
func dequeueCell(tableView: UITableView, indexPath: IndexPath) -> UITableViewCell | |
func cellSelected(_ indexPath: IndexPath) | |
} | |
//MARK: - Default Implementation |
This file contains hidden or 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
// | |
// HasDisposeBag.swift | |
// | |
// Created by Pavan Kataria 26/09/2017 | |
// Copyright © 2017 Pavan Kataria. All rights reserved. | |
protocol HasDisposeBag { | |
var disposeBag: DisposeBag { get } | |
} | |
private struct AssociatedKeys { |
This file contains hidden or 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
class ApiManager { | |
class func GET( | |
URLString: URLStringConvertible, | |
parameters: [String : AnyObject]? = nil, | |
encoding: ParameterEncoding? = .URL, | |
headers: [String : String]? = nil, | |
completionHandler: CompletionHandlerType | |
){ | |
alamofireManager().request(.GET, URLString, parameters: parameters, encoding: encoding!, headers: headers) | |
.validate() |
NewerOlder