Quantcast
Channel: IOS - Back Button IOS6 vs IOS7 - Stack Overflow
Viewing all articles
Browse latest Browse all 2

IOS - Back Button IOS6 vs IOS7

$
0
0

How can I add a space between the background image of the Navigation and the Text in IOS 7. For IOS 6, adding a space make the text at the correct place.

Navbar from IOS 6 :

Navbar from IOS 6 :

Navbar from IOS 7 :

Navbar from IOS 7 :

My code in AppDelegate to redefine all back buttons :

// Change the appearance of other navigation buttonUIImage *barButtonImage = [[UIImage imageNamed:@"icon_back_str.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 31, 0, 0)];[[UIBarButtonItem appearance] setBackButtonBackgroundImage:barButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];//Adapt the Text of the ButtonsNSDictionary *normalAttributes = [NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"MyFont" size:20.0], UITextAttributeFont,nil];[[UIBarButtonItem appearance] setTitleTextAttributes:normalAttributes forState:UIControlStateNormal];

In my code, to set the text :

- (void) viewWillDisappear:(BOOL)animated {self.navigationItem.title =  @" Zurück";}

How can Add this space in IOs 7. Thanks.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images