Reputation: 319
i am using UIalertView,
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:appname
message:@"some blah blah!"
delegate:nil
cancelButtonTitle:@"Ok"
otherButtonTitles:@"Free content", nil];
[alert show];
here i want to reduce the font size of "Free content" when alert view pops up(something like arial-9)font,is there any way to reduce the font or design it in a custom way?
thanks,
Upvotes: 2
Views: 1379
Reputation: 3013
You cannot customize the appearance of UIAlertView,
because the view hierarchy for this class is private and must not be modified.
for more see UIAlertView Class Reference:UIAlertView Class Reference:
why not?
you can use Custom AlertView with desire apperance
see the below link how to create custom alertviews with your desired apperance CustomAlertView Sample
Upvotes: 2
Reputation: 1558
UIAlertView is deprecated as of iOS 8. You need to use UIAlertController from iOS8 onwards. You can use Key-Value coding to set UIAlertController's button font using attributedTitle key.
More on the answer provided here.
UIAlertController custom font, size, color
Upvotes: 0