KyoheiG3 / SimpleAlert

Customizable simple Alert and simple ActionSheet for Swift
MIT License
398 stars 45 forks source link

Hidden custom view when neither of title, message or text field is used #39

Closed DanPetras closed 2 years ago

DanPetras commented 5 years ago

From version 5.0.0 it is not possible to see the custom view if I don't set also the title or message.

I try to use it like this

let alertView = ...
let alert = AlertController(view: alertView, style: .alert)
let cancelAction = ...
let addAction = ...
alert.addAction(cancelAction)
alert.addAction(addAction)
present(alert, animated: true, completion: nil)

But I can see only the buttons.

I located the problem to be here (and next line also): https://github.com/KyoheiG3/SimpleAlert/blob/057e8330941c8cac798489ce3fbebe8441543476/SimpleAlert/AlertContentView.swift#L29

guzhenhuaGitHub commented 2 years ago

It's happened to me, too.