I have created a Image Picker UI where I want to do selection when user clicked on the button,
I have done it using UIAlertController and when I test it in iPhone then it works perfect but,
when I test it in iPad then after button Clicked, the app crashed.
How do I make the UIAlertController compatible for iPad also?
3
Answers
We can use
Full Code in swift
Functions that are used in above code (for camera & Gallery)
Extension for UIViewController
Usages
On an iPad a uialertcontroller must be shown relative to some other controller because you can’t just show it “anywhere on the screen”.