The font is very small and hard for some to read so I'd like to make it closer to the font size used on the buttons below it.
You can change font property after show method(like showFromBarButtonItem) as below.
CGRect oldFrame = [(UILabel*)[[sheet subviews] objectAtIndex:0] frame];
UILabel *newTitle = [[[UILabel alloc] initWithFrame:oldFrame] autorelease];
newTitle.font = [UIFont boldSystemFontOfSize:17];
newTitle.textAlignment = UITextAlignmentCenter;
newTitle.backgroundColor = [UIColor clearColor];
newTitle.textColor = [UIColor whiteColor];
newTitle.text = @"My Title";
[sheet addSubview:newTitle];
[sheet release];
Like Nimrod said you can't do this with a native method. You could check the UIActionSheet subviews, find the good one and change its properties.
BUT
SO
You really should don't change the font size used.. If this UIActionSheet title is important you should find another way to show it to the user...
From the UIActionSheet Class Reference:
UIActionSheet is not designed to be subclassed, nor should you add views to its hierarchy. If you need to present a sheet with more customization than provided by the UIActionSheet API, you can create your own and present it modally with
presentViewController:animated:completion:
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With