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
protocol Downloader { | |
func fetch(from url: SecureURLType) | |
} | |
protocol SecureURLType { | |
init?(from url: URL, validator: URL -> Bool) | |
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
public final class MyViewController: UIViewController { | |
@IBOutlet weak var someView: UIView! | |
@IBOutlet weak var someLabel: UIView! | |
@IBOutlet weak var someButton: UIView! | |
@IBOutlet weak var otherView: UIView! | |
@IBOutlet weak var yetAnotherView: UIView! |
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
protocol UIComponentType { | |
associatedtype Controller | |
associatedtype View | |
associatedtype ViewModel | |
func createController() -> Controller | |
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
public protocol PaginationServiceType { | |
associatedtype Element | |
init(elementProvider: (page: Int, numberOfElements: Int) -> SignalProducer<[Element], NoError>) | |
func fetchNextPage(numberOfElements: Int) -> SignalProducer<[Element], NoError> | |
} |
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
input { | |
syslog { | |
host => localhost | |
port => 5000 | |
} | |
} | |
filter { | |
} |
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://labs.kunstmaan.be/blog/ios-continuous-delivery-with-jenkins-and-fastlane?this-one-is-for-you-roderik | |
# Define the minimal Fastlane version | |
# fastlane_version "1.41.1" | |
# Use the iOS platform as default | |
default_platform :ios | |
# Define what to do for the iOS platform | |
platform :ios do |
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 UIView { | |
private var previousHeightConstraint: NSLayoutConstraint? { | |
return constraints.filterFirst { $0.firstAttribute == .Height } | |
} | |
} | |
/** | |
Collapse a view by adding/modifying constraint height. |
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
private var AssociatedKey: UInt = 0 | |
private final class AssociatedObjectBox<T> { | |
let value: T | |
init(_ x: T) { | |
value = x | |
} | |
} |
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
private var AssociatedKey: UInt = 1 | |
private final class AssociatedObjectBox<T> { | |
let value: T | |
init(_ x: T) { | |
value = x | |
} | |
} |
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
public final class MyViewController: UIViewController { | |
// Your implementation | |
} | |
extension MyViewController: ViewModelBindable { | |
public func bindViewModel(viewModel: MyViewModel) { | |
// binding logic | |
} |