Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

UINavigationBar titleTextAttributes ignored in modally presented view controllers when set via UIAppearance proxy #120

Open
postmechanical opened this issue Oct 15, 2013 · 4 comments
Labels

Comments

@postmechanical
Copy link

    // Assume [UI7Kit patchIfNeeded] called in main.m before NSApplicationMain
    [[UINavigationBar appearance] setTitleTextAttributes:@{ UITextAttributeTextColor : [UIColor blueColor] }];

    // self.navigationController's view controllers all have correct text color.

    UIViewController *vc = [[UIViewController alloc] init];
    vc.title = @"Test";
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:vc];
    [self.navigationController presentViewController:navController animated:YES completion:nil];

    // navController's view controllers do not have correct text color.
@postmechanical
Copy link
Author

Add a search bar to the modally presented view controller and you get another issue. The search bar doesn't patch properly.

ios simulator screen shot oct 15 2013 3 41 37 pm

@postmechanical
Copy link
Author

Another issue. If you do the following:

        [UI7Kit excludeClassNamesFromAutopatch:@[@"UI7NavigationBar"]];
        [UI7Kit patchIfNeeded];

Then an initial navigation view controller does not have its navigation bar patched, but any subsequently modally presented navigation view controller does have its navigation bar patched.

@postmechanical
Copy link
Author

This may be an issue only in a modal view controller presented on an existing modal view controller.

@postmechanical
Copy link
Author

This appears to be an issue with custom UINavigationController subclasses only.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant