I'm using the default style of UIAlertController
and UIAlertAction
but I'm getting white text on white background as in the screenshot
Here is my code:
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"0237826726" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self callPlaceNumber:@"0237826726"];
}];
[alert addAction:defaultAction];
UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[alert dismissViewControllerAnimated:YES completion:nil];
}];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];
I searched for the problem and I found that I can add tintColor
for the UIAlertController
as follow but it didn't work.
alert.view.tintColor = [UIColor blackColor];
Is this a normal behaviour or is there anything wrong in my code?