2014-09-24 54 views

回答

1

我有同樣的問題。我有一個自定義的導航欄和BarItems。

我的解決方案是使用沒有過時鍵自定義(見本示例):

,而不是使用這個鍵(按鍵不建議使用):

@{ UITextAttributeTextColor: [self navigationBarTextColor], 
    UITextAttributeFont: [UIFont boldSystemFontOfSize:0.0], 
    UITextAttributeTextShadowOffset: @0 }; 

此:

NSShadow * shadow = [NSShadow new]; [shadow setShadowOffset:CGSizeMake(0.0f,0.0f)];

@{ NSForegroundColorAttributeName: [self navigationBarTextColor], 
    NSFontAttributeName: [UIFont boldSystemFontOfSize:0.0], 
    NSShadowAttributeName: shadow }; 

我希望它有幫助。