fuz*_*uzz 3 iphone objective-c uinavigationbar
有没有办法将self.navigationItem.prompt颜色设置为白色?目前它是黑色的.
这就是我现在设置navigationBar颜色的方法:
// Set top navigation bar.
UINavigationBar *bar = [navController navigationBar];
[bar setTintColor:[UIColor colorWithRed:180.0/255.0 green:25.0/255.0 blue:34.0/255.0 alpha:1]];
UIImageView *navBar = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
[navBar release];
Run Code Online (Sandbox Code Playgroud)
..这就是我设置我的方式navigationItem.prompt:
self.navigationItem.prompt = @"Tap image for more options.";
Run Code Online (Sandbox Code Playgroud)
它现在可以在iOS 5或更高版本中使用.试试这个代码.
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], UITextAttributeTextColor, nil]];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5753 次 |
| 最近记录: |