views:

2936

answers:

3

Hi! My client can't read iPhone's deafault fonts, the size is too small. I have an application with a navigation bar and I need to make everything in it bigger, for example, the font's size.

IB doesn't seem to allow this... any help?

Many thanks!

+6  A: 

This is generally impossible.

What's more, I believe making the navigation bar taller is a violation of Apple Human Interface Guidelines, and your application may be rejected from the App Store because of it. Please make sure your client understands this risk before proceeding.

(Pointing out rejection risks is usually a good way to convince clients against making nonsense decisions.)

Andrey Tarantsov
What about making the navigation bar fonts bigger? Is that possible and/or allowed?
Hectoret
At the very least you can use a custom title view, so I would count this as possible. Also I don't think you will be rejected because of a custom title view, so should be safe. I wouldn't recommend to try to play with the font size of the buttons.
Andrey Tarantsov
+1  A: 

Have you tried subclassing it?

+3  A: 

If you decided to just change the font size in the navigation bar, you can do this (usually in your UIViewController's viewDidLoad method):

UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];

[titleLabel setBackgroundColor:[UIColor clearColor]];
// here's where you can customize the font size
[titleLabel setFont:[UIFont boldSystemFontOfSize:18.0]];
[titleLabel setTextColor:[UIColor whiteColor]];
[titleLabel setText:self.title];
[titleLabel sizeToFit];
[titleLabel setCenter:[self.navigationItem.titleView center]];

[self.navigationItem setTitleView:titleLabel];

[titleLabel release];
Marco Lazzeri