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
Post a Comment