0

Is there a way we can customize the UIAlertController to look like the following:

enter image description here

Currently, it looks like this:

enter image description here

I know how to get rid of the cancel action. I just need it to occupy the parent width and change the color scheme and stuff.

If UIAlertController cannot be customized to achieve this, is there any other option that I can use for this? Cannot use 3rd party software, needs to be built in Swift 4.2.

Thanks!

xertzer
  • 69
  • 6
  • Why not you are using custom UIView for this? – Faysal Ahmed Sep 01 '20 at 19:22
  • Hey, thanks for the comment. Is there an example I can look at for this? Pretty new to iOS. – xertzer Sep 01 '20 at 19:32
  • Do you know how to make design on Storyboard? If know then design the save view on the storyboard same as your desired UI that you want instead of using UIAlertController. – Faysal Ahmed Sep 01 '20 at 19:40
  • 1
    Does this answer your question? [Custom View in UIAlertController](https://stackoverflow.com/questions/43505737/custom-view-in-uialertcontroller) – Kamil.S Sep 01 '20 at 19:48

2 Answers2

0

This really seems like a UIView with a TableView inside it... if you can't use any third party software you might struggle to make it... but you can check this question to see if it helps How to embed a UITableView in a custom view

0

Your custom design can't be obtained by configuring an instance of UIAlertController.

You have to create your own custom UIView or UIViewController.

Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93