Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In iOS UIAlertController, Can we left align text of UIAlertAction

I Need to implement a UIAlertController such as this UIAlertController with left alligned UIAlertAction

description1

After searching quite a lot in the internet and here in stackoverflow, I was able to achieve left aligned title of UIAlertController

description2

But how to left align text of UIAlertAction ?

Any help/clue would be very helpful.

like image 472
Anand Reddy Avatar asked Aug 29 '16 18:08

Anand Reddy


1 Answers

Yes you can, with the following

[(your uialertaction object) setValue:@0 forKey:@"titleTextAlignment"]
like image 79
CodeNinjaSuperTrooperMitEine Avatar answered Oct 05 '22 01:10

CodeNinjaSuperTrooperMitEine