Skip to content

Instantly share code, notes, and snippets.

@IsaAliev
Created October 10, 2018 08:48
Show Gist options
  • Save IsaAliev/a7f058a5da536f2b1eed4e3fc626505e to your computer and use it in GitHub Desktop.
Save IsaAliev/a7f058a5da536f2b1eed4e3fc626505e to your computer and use it in GitHub Desktop.
import Foundation
import Bond
class ViewModel: AlertPresentableViewModel {
var alertModel = Observable<AlertModel?>(nil)
func setup() {
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) {
self.alertModel.value = AlertModel(actionModels: [AlertModel.ActionModel.init(title: "OK", style: .default, handler: nil)], title: "Alert example", message: "That's our easy alert.", prefferedStyle: .alert)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment