1

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?

aakpro
  • 1,538
  • 2
  • 19
  • 53
  • 3
    can u show a screenshot ? – IronManGill Aug 31 '13 at 05:43
  • http://stackoverflow.com/questions/10890723/putting-text-shadow-on-a-uibutton-text-label and http://stackoverflow.com/questions/5178896/adding-a-shadow-to-a-uibutton-label-in-xcode – iPatel Aug 31 '13 at 05:51
  • check this link http://stackoverflow.com/questions/11084331/how-do-i-disable-the-navigation-bar-shadow-in-ios-6-for-navigation-bars-with-cus – Darshan Kunjadiya Aug 31 '13 at 05:53

1 Answers1

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

Joe Habadas
  • 628
  • 8
  • 21