Skip to main content
Code visible without horizontal scrolling
Source Link
JOM
  • 8.2k
  • 6
  • 80
  • 112

I'm trying to change the back button arrow

enter image description here

I'm currently using the following to control the text size as well as the text color on the back button:

[[UIBarButtonItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:  [UIColor whiteColor], UITextAttributeTextColor,  [UIFont boldSystemFontOfSize:16.0f], UITextAttributeFont,  [UIColor darkGrayColor], UITextAttributeTextShadowColor,  [NSValue valueWithCGSize:CGSizeMake(0.0, -1.0)], UITextAttributeTextShadowOffset,   nil] forState:UIControlStateNormal]; 

but if I want to change only the arrow's color for the back button, what should i do?

I'm trying to change the back button arrow

enter image description here

I'm currently using the following to control the text size as well as the text color on the back button:

[[UIBarButtonItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], UITextAttributeTextColor, [UIFont boldSystemFontOfSize:16.0f], UITextAttributeFont, [UIColor darkGrayColor], UITextAttributeTextShadowColor, [NSValue valueWithCGSize:CGSizeMake(0.0, -1.0)], UITextAttributeTextShadowOffset,   nil] forState:UIControlStateNormal]; 

but if I want to change only the arrow's color for the back button, what should i do?

I'm trying to change the back button arrow

enter image description here

I'm currently using the following to control the text size as well as the text color on the back button:

[[UIBarButtonItem appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:  [UIColor whiteColor], UITextAttributeTextColor,  [UIFont boldSystemFontOfSize:16.0f], UITextAttributeFont,  [UIColor darkGrayColor], UITextAttributeTextShadowColor,  [NSValue valueWithCGSize:CGSizeMake(0.0, -1.0)], UITextAttributeTextShadowOffset, nil] forState:UIControlStateNormal]; 

but if I want to change only the arrow's color for the back button, what should i do?

Source Link
kevinl
  • 4.2k
  • 6
  • 39
  • 55

iOS 7 UIBarButton back button arrow color

I'm trying to change the back button arrow

enter image description here

I'm currently using the following to control the text size as well as the text color on the back button:

[[UIBarButtonItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor whiteColor], UITextAttributeTextColor, [UIFont boldSystemFontOfSize:16.0f], UITextAttributeFont, [UIColor darkGrayColor], UITextAttributeTextShadowColor, [NSValue valueWithCGSize:CGSizeMake(0.0, -1.0)], UITextAttributeTextShadowOffset, nil] forState:UIControlStateNormal]; 

but if I want to change only the arrow's color for the back button, what should i do?