ios - How to change UIAlertController button text colour in iOS9? -


the question similar ios 8 uiactivityviewcontroller , uialertcontroller button text color uses window's tintcolor in ios 9.

i have uialertcontroller , dismiss button keeps white colour have tried set

[[uiview appearancewhencontainedin:[uialertcontroller class], nil] settintcolor:[uicolor blackcolor]];  uialertcontroller *strongcontroller = [uialertcontroller alertcontrollerwithtitle:title                                                              message:message                                                       preferredstyle:preferredstyle]; strongcontroller.view.tintcolor = [uicolor black]; 

i've run similar in past , issue seems stem fact alert controller's view isn't ready accept tintcolor changes before it's presented. alternatively, try setting tint color after present alert controller:

[self presentviewcontroller:strongcontroller animated:yes completion:nil]; strongcontroller.view.tintcolor = [uicolor black]; 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -