Customizing UINavigationBar
Categories: Apple, iPhone on Dec.09, 2009
Change color for UINavigationBar
1 | [[controller navigationBar] setTintColor:[UIColor colorWithRed:0.36 green:0.09 blue:0.39 alpha:1.00]]; |
Set custom title for UINavigationBar
1 2 3 4 5 6 7 8 9 | CGRect frame = CGRectMake(0, 0, 400, 44); UILabel *label = [[[UILabel alloc] initWithFrame:frame] autorelease]; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont boldSystemFontOfSize:20.0]; label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0]; label.textAlignment = UITextAlignmentCenter; label.textColor = [UIColor blackColor]; label.text = navBar.topItem.title; navBar.topItem.titleView = label; |
Similar posts:

Оставить отзыв