标签:bar content style controls data key mst and 创建
//创建一个左边button
UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"<" style:UIBarButtonItemStylePlain target:self action:@selector(clickLeftButton)];
// leftButton.
[leftButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName,
[UIColor greenColor], NSForegroundColorAttributeName,
nil]
forState:UIControlStateNormal];
//创建一个右边button
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"登陆" style:UIBarButtonItemStyleDone target:self action:@selector(clickRightButton)];
[rightButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"Helvetica-Bold" size:17.0], NSFontAttributeName,
[UIColor greenColor], NSForegroundColorAttributeName,
nil]
forState:UIControlStateNormal];
改动UINavigationBar (导航栏)上NavigationBarItem 的字体大小和颜色的用法
标签:bar content style controls data key mst and 创建
原文地址:http://www.cnblogs.com/claireyuancy/p/6938384.html