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
| { | |
| "thumbnail_must_containt" : "mdCMN09Image" | |
| } |
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
| https://wallpaperscraft.com/image/cosmos_sun_eclipse_clouds_58244_720x1280.jpg,https://wallpaperscraft.com/image/mountains_nature_sky_river_beautiful_scenery_93460_720x1280.jpg |
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
| fastlane_version "2.50.1" | |
| default_platform :ios | |
| platform :ios do | |
| before_all do | |
| # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." | |
| # cocoapods | |
| end |
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
| extension Float { | |
| var toInt32: Int32 { | |
| // Directly bitwise copy and expressed as Int32 | |
| return Int32(bitPattern: self.bitPattern) | |
| } | |
| } | |
| lef f1 = Float(338_556) | |
| let f2 = f1 + f1.ulp |
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
| /* | |
| From: https://twitter.com/johnsundell/status/948513364015288320?utm_content=buffer67c28&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer | |
| */ | |
| extension UIView { | |
| func add(_ subviews: UIView...) { | |
| subviews.forEach(addSubview) | |
| } | |
| } |
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
| // From https://github.com/devxoul/Then/blob/master/Sources/Then/Then.swift | |
| // It's easy to move them into your codebase | |
| import Foundation | |
| public protocol Then {} | |
| extension Then where Self: Any { | |
| /// Makes it available to set properties with closures just after initializing. | |
| /// |
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 MapViewController: UIViewController { | |
| var isLoaded = false | |
| } | |
| extension MapViewController: MKMapViewDelegate { | |
| func mapViewDidChangeVisibleRegion(_ mapView: MKMapView) { | |
| if isLoaded { | |
| mapDidDrag() | |
| } | |
| } |
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 ReactiveSwift | |
| import Result | |
| class MapViewController: UIViewController { | |
| private let (didLoadSingal, didLoadObserver) = Signal<Bool, NoError>.pipe() | |
| private let (didDragSignal, didDragObserver) = Signal<Bool, NoError>.pipe() | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
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
| /*----------------------------------------------------*/ | |
| #pragma mark - XCTAsserts | |
| /*----------------------------------------------------*/ | |
| XCTAssert(expression, format...); | |
| XCTAssertTrue(expression, format...); | |
| XCTAssertFalse(expression, format...); | |
| XCTAssertEqual(expression1, expression2, format...); | |
| XCTAssertNotEqual(expression1, expression2, format...); | |
| XCTAssertNil(expression, format...); |
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 RxSwift | |
| enum HTTPMethod: String { | |
| case POST, GET | |
| } | |
| // protocol of request, should define endpoint, http method, params and response type | |
| protocol Request { | |
| var path: String { get } |