0
votes

There're 2 view controllers: vc1 and vc2.

vc1 pushes vc2 and while vc2 is top view controller I change titleTextAttributes of the navigationBar. Text is using new attributes, everything is fine.

Problem: When a user presses back button on vc2 and transition animation starts, title of the previous view controller (vc1) is still drawn using old attributes and it instantly changes to new attributes only when transition animation finishes. Looks weird.

I expect and want vc1 to take new attributes immediately. In fact attributes are set but transition animation doesn't reflect it. Looks like system is caching something somewhere but I don't know what and where.

1
Do you want the vc1 title to use the previous attributes, or do you want the vc2 attributes to remain in place?Léo Natan
@LeoNatan I want vc2 attributes to remain in place, clarified my questionIndoor

1 Answers

1
votes

I'm coming to conclusion this is one of the bugs in iOS 7. In the same animation I see inconsistencies affecting positions of navigation bar buttons (they jump from one location to another during animation).

Meanwhile there's a fix to the original problem. In order to force previous view controller to redraw its title with new attributes before animation starts we can set its title to some other string and then back to original string. Then the animation reflects the new attributes.