You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [Alert.swift](https://github.com/AntonPoltoratskyi/NativeUI/blob/master/NativeUI/Sources/Alert/Alert.swift) for more details.
103
103
104
+
### Edge cases
105
+
106
+
When you need to present few alerts in a row you should set `shouldDismissAutomatically` flag to `false` and add action AFTER view controller initialization to be able to capture alert instance in action handler's closure.
107
+
108
+
```swift
109
+
let cancelAction = Alert.Action(title: "Cancel", style: .primary)
110
+
111
+
let viewModel =Alert(
112
+
title: "Your Title",
113
+
message: "Your Message",
114
+
actions: [cancelAction]
115
+
)
116
+
let alert =AlertViewController(viewModel: viewModel)
0 commit comments