반응형
출처: http://www.devpia.com/MAEUL/Contents/Detail.aspx?BoardID=7462&MAEULNO=911&no=51676&page=1
아래와 같이 배경색을 바꿀 수 있습니다.
You can change background color of navigation bar like this.
[[controller navigationBar] setTintColor:[UIColor colorWithRed:0.36 green:0.09 blue:0.39 alpha:1.00]];
타이틀은 다음과 같이 지정할 수 있습니다.
You can set the title like this.
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;
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;
'iOS > Skills' 카테고리의 다른 글
UIBarButtonSystemItem 추가된 아이템 (0) | 2010.07.21 |
---|---|
UIAlertView 커스터마이징 (0) | 2010.07.21 |
UIImage 마스크(스텐실) 효과 주기 - Core Graphics (0) | 2010.07.21 |
App Icon에 뱃지(Badge) 달기 (0) | 2010.07.21 |
앱 아이콘 반사효과 없애기 (0) | 2010.07.21 |