将 AlertRow 与 Eureka 一起使用 如何在触摸外部任何地方时关闭警报 window

Using AlertRow with Eureka How to close Alert window when touching anywhere outside

我正在使用 Eureka 库中的 AlertRow。

触摸外面的任何地方时是否可以关闭警报window?

<<< AlertRow<String>("categoryTag") {
    [=11=].title = "AlertRow"
    [=11=].optionTitle = "Pick a number"
    [=11=].options = ["One","Two","Three"]
    [=11=].value = "Two"
}

If you go deeper you see that AlertRow is UIAlertController with .alert preferred style under the hood. There is no default implementation of closing alert by tapping outside the alertController, but you can subclass your own XXXAlertRow and implement this logic ().