is there a way to display 3 action buttons into UIAlertController and to be on the same line ?
-
Follow this link http://stackoverflow.com/questions/24022479/how-would-i-create-a-uialertview-in-swift it would be helpful!!! – Sanjeet Verma Sep 03 '16 at 06:50
1 Answers
I don't think you can place 3 UIAlertAction
s adjacent to each other using UIAlertController
. And I suggest you not to do that.
Most designs in iOS have a reason behind it. This "3 UIAlertAction
s can't be placed adjacent to each other" design is one of those. Think about why it doesn't allow you to do this.
The UIAlertView
that a UIAlertController
controls is tiny. And users' fingers are large. If we squeeze all three buttons into one row. Each of them will be very small. As a result, the user might mis-tap! You might not understand this on the Simulator, but try this on a real phone:
Put 3 small UIView
s adjacent to each other. And put touch detection code for all three of them. Now try to touch one of the views. You will find that it's hard. You will have to aim for it.
TL;DR: The UX will be very bad if you put three buttons adjacent to each other.

- 213,210
- 22
- 193
- 313