I used following codes to customize text of a Customized 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];
But the titleText get a little shadow.
How can I remove that shadow?
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];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.