Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DanPetras opened this issue Nov 11, 2019 · 1 comment · Fixed by #45
Closed

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

DanPetras opened this issue Nov 11, 2019 · 1 comment · Fixed by #45

Comments

@DanPetras
Copy link

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):

isHidden = titleLabel.isHidden && messageLabel.isHidden && textFieldView.isHidden

@guzhenhuaGitHub
Copy link
Contributor

It's happened to me, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants