2013-08-31 2 views
1

Я использовал следующие коды для настройки текста из в Customized UIBarButtonItem:Удалите тень в тексте UIButton

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 получить немного тени.

Как я могу удалить эту тень?

+3

может у показать скриншот? – IronManGill

+0

http://stackoverflow.com/questions/10890723/putting-text-shadow-on-a-uibutton-text-label и http://stackoverflow.com/questions/5178896/adding-a-shadow-to-a -uibutton-label-in-xcode – iPatel

+0

проверить эту ссылку http://stackoverflow.com/questions/11084331/how-do-i-disable-the-navigation-bar-shadow-in-ios-6-for-navigation- бары-с-кли –

ответ

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

Смежные вопросы