I still updated the back button element in the navigation bar of the application to look in iOS 7, like it was in iOS 6, but I can’t get a text shadow to display in iOS 7.
iOS 7:

iOS 6:

(bias was done more for testing)
code:
UIButton *backButton = [[UIButton alloc] initWithFrame: CGRectMake(0, 0, 80.0f + width_offset, 30.0f)];
UIImage *buttonImage = [[UIImage imageNamed:@"navigation_back_btn"] resizableImageWithCapInsets:UIEdgeInsetsMake(5, 15, 5, 5)];
[backButton setBackgroundImage:buttonImage forState:UIControlStateNormal];
[backButton setTitle:title forState:UIControlStateNormal];
[backButton.titleLabel setFont:[UIFont defaultFontWithType:kFontBold andSize:12]];
[backButton.titleLabel setTextColor:[UIColor whiteColor]];
[backButton.titleLabel setShadowColor = [UIColor blackColor]];
[backButton.titleLabel setShadowOffset:CGSizeMake(5.0f, 5.0f)];
[backButton addTarget:viewController action:@selector(popBack) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *backButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
viewController.navigationItem.leftBarButtonItem = backButtonItem;
I would also like to move the button to the left, but this is much less important.
source
share