Skip to content

Instantly share code, notes, and snippets.

@wonkwh
Created December 21, 2011 05:09
Show Gist options
  • Save wonkwh/1504675 to your computer and use it in GitHub Desktop.
Save wonkwh/1504675 to your computer and use it in GitHub Desktop.
UINavigationBar의 배경이미지가 적용됨
UILabel *titleLabel = [[UILabel alloc] initWithFrame:
CGRectMake(0.0f, 0.0f, 200.0f, 25.0f)];
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = [UIFont systemFontOfSize:20.0f];
titleLabel.textAlignment = UITextAlignmentCenter;
titleLabel.textColor = [UIColor blackColor];
titleLabel.text = @"잘되는구먼!";
self.navigationItem.titleView = titleLabel;
[titleLabel release];
self.navigationController.navigationBar.layer.contents =
(id)[UIImage imageNamed:@"title1_bar.png"].CGImage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment