Martin Pilch
Martin Pilch

Reputation: 3305

UIBarButtonItem jumps on back gesture when using custom font

I've problem with customising UIBarButtonItem title text attributes. When I use custom font (Clear Sans by Intel) it jumps on back gesture, when popping the view controller. Have you met the same problem?

Code to set attributes is:

[[UIBarButtonItem appearance] setTitleTextAttributes: @{ NSFontAttributeName: [UIFont fontWithName:@"ClearSans" size:17.0f], NSForegroundColorAttributeName: kRedColor } forState: UIControlStateNormal];

You can find the gif example here. Watch the Edit button: button jump

Upvotes: 1

Views: 312

Answers (1)

Rainer Schwarze
Rainer Schwarze

Reputation: 4755

Do you have some code in viewDidAppear which might trigger that? If so, it might make sense to move it to viewWillAppear.

Upvotes: 1

Related Questions