I'm trying to change the offset of the shadow behind the text in a UIBarButtonItem.

This is my code:

NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
[attributes setValue:[UIColor colorWithWhite:0.30 alpha:1.0] forKey:UITextAttributeTextColor];
[attributes setValue:[UIColor whiteColor] forKey:UITextAttributeTextShadowColor];
[attributes setValue:[NSValue valueWithUIOffset:UIOffsetMake(0.0, 0.0)] forKey:UITextAttributeTextShadowOffset];
[[UIBarButtonItem appearance] setTitleTextAttributes:attributes forState:UIControlStateNormal];

Changing the text color works. Changing the shadow color works. Changing the shadow offset doesn't seem to do anything.

Is something wrong with the way I'm doing this? I've also tried setting it directly, without the appearance proxy, but that didn't work either.

Edit
Report