我使用以下代码自定义自定义UIBarButtonItem 的 text :
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会有一点影子。
如何删除该影子?
答案 0 :(得分: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];