1

我使用以下代码来自定义自定义 UIBarButtonItem文本

editButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(editPressed)];
    self.navigationItem.rightBarButtonItem = editButton;
[editButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"HelveticaNeue" size:17.0], UITextAttributeFont, nil] forState:UIControlStateNormal];

但是titleText得到了一点阴影。

我怎样才能消除那个阴影?

4

1 回答 1

0
editButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self action:@selector(editPressed)];
    self.navigationItem.rightBarButtonItem = editButton;
[editButton setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"HelveticaNeue" size:17.0], UITextAttributeFont,

[UIColor clearColor], UITextAttributeTextShadowColor, nil]

forState:UIControlStateNormal];

https://developer.apple.com/library/ios/documentation/uikit/reference/NSString_UIKit_Additions/Reference/Reference.html#//apple_ref/doc/uid/TP40006893

于 2013-08-31T05:46:44.150 回答