How can I show full screen AlertViews in Swift. What I have done is added a UIView(custom alert view) on top of View controller in storyboard. Is there any other way to do it?
Asked
Active
Viewed 1,027 times
-1
-
Do you not like this approach because it uses storyboards? Because it covers up the other views in the VC? Something else? Also, are you going to show this alert in multiple places? If so, doing this on every view controller in the storyboard might be a pain... – Sweeper Feb 07 '20 at 07:22
-
It will be in multiple controllers but will have different views like some have images other have text and buttons – ios Feb 07 '20 at 07:58
1 Answers
0
It is better to create a xib file that contains your custom alert view
and subclass it to UIView
for custom properties and methods. And just programatically show it in your view controller
.
You can check this out on how to implement it.
https://stackoverflow.com/a/39586736/11138557
Happy coding :D

Sky Shadow
- 324
- 2
- 10