by
0 9

BindableType protocol implementation

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/2494156/BindableType-protocol-implementation?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
protocol BindableType { associatedtype ViewModelType var viewModel: ViewModelType! { get set } func bindViewModel() } extension BindableType where Self: UIViewController { mutating func bindViewModel(to model: Self.ViewModelType) { viewModel = model loadViewIfNeeded() bindViewModel() } }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus