2013-03-18 113 views
1

我不确定这是否可更改,但我注意到我的自定义导航控制器的标题上有轻微的阴影。删除文字阴影

图片:http://imgur.com/60XjLWE

它使文字看起来模糊,这是一种烦人。

这是代码我使用:[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor colorWithRed:52.0/255.0 green:54.0/255.0 blue:61.0/255.0 alpha:1.0],UITextAttributeTextColor, [UIFont fontWithName:@"Helvetica Neue-Bold" size:0.0],UITextAttributeFont, nil]];

任何想法如何去除标题的影子?

回答

-2

将这个在你的AppDelegate

[[UINavigationBar appearance]setShadowImage:[[UIImage alloc] init]]; 
+5

这只能从UINavigationBar的下方删除影子。 不在标题内。 – 2013-06-21 05:04:06

4

你可以把它透明:

[[UINavigationBar appearance] setTitleTextAttributes: 
    [NSDictionary dictionaryWithObjectsAndKeys: 
    [UIColor colorWithRed:52.0/255.0 green:54.0/255.0 blue:61.0/255.0 alpha:1.0], UITextAttributeTextColor, 
    [UIColor clearColor], UITextAttributeTextShadowColor, 
    [UIFont fontWithName:@"Helvetica Neue-Bold" size:0.0], UITextAttributeFont, nil]];