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
2015-04-15 11:21:38.929 fasten[841:186573] startLoaderSpin | |
2015-04-15 11:21:39.086 fasten[841:186573] Connected to ws://95.213.131.42:8080 | |
2015-04-15 11:21:39.119 fasten[841:186573] sending - { | |
"api_token" = "222b2c85-62a4-4a86-86f3-364a9482de82"; | |
type = "CUSTOMER_GET_CREDIT_CARDS"; | |
} | |
2015-04-15 11:21:39.120 fasten[841:186573] sending - { | |
"api_token" = "222b2c85-62a4-4a86-86f3-364a9482de82"; | |
data = { | |
"car_capacity" = 4; |
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
class StrongLoginPresenter { | |
// MARK: - Inner | |
func login { | |
// Work with data | |
} | |
// MARK: - Network | |
func sendLoginRequest { | |
// Work with URLRequest formed |
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 LoginInteractorInput { | |
func doLogin(login: String, password: String) -> Bool | |
} | |
protocol LoginRouterInput { | |
func openMainScreen() | |
} | |
class LoginInteractor: LoginInteractorInput { | |
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 AnalyticType { | |
func track(_ event: String, parameters: [String: Any]?) | |
} | |
final class FacebookAnalytic: AnalyticType { | |
func track(_ event: String, parameters: [String : Any]?) { | |
// TODO: - Send facebook event | |
} | |
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 NameType { | |
var name: String { get } | |
} | |
class UserShort: NameType { | |
var id: UInt | |
var name: String | |
init(id: UInt, 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
protocol ResourceType { | |
func load() | |
} | |
protocol PagginationProtocol { | |
var offset: UInt { get set } | |
var limit: UInt! { get set } | |
var hasMore: Bool { get } | |
func loadMore() | |
} |
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 UserType { | |
var id: UInt { get set } | |
var name: String { get set } | |
} | |
struct User: UserType { | |
var id: UInt | |
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 | |
var str = "Hello, playground" | |
class BaseViewController: UIViewController { | |
var handledErrorCodes: [Int: String] = [200: "localized.title", 210: "localized.title.error"] | |
func showError(error: NSError) { | |
let code = error.code |
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
├─ Models | |
├─ Views | |
├─ Modules (ViewModels - MVVM, Controllers - MVC) | |
├─ Stores | |
├─ Extensions | |
├─ Utils | |
├─ Helpers | |
├─ etc... | |
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
struct Constants { | |
struct UI { | |
static let chooseTransportCellHeight: CGFloat = 90 | |
static let settingsSectionHeaderHeight: CGFloat = 60 | |
private init() {} | |
} |
OlderNewer