Question

So I would like to change the title for the ABUnknownPersonViewController, and so I set it via code by setting the navigation item's title and titleView to put my custom label on it.

unknownPersonVC.title = @"title"
uknownPersonVC.titleView = myLabel;

This works OK.

In the UnknownPersonVC, there are cells "Create New Contact" and "Add to Existing Contact".

Tapping on them brings up screen to add a new contact or add to existing contact "modally".

How can I change the color of the navigationItem.titleView for those MVCs (or) set my label programmatically ?

Any ideas/hacks ?

Was it helpful?

Solution

For anyone who is looking for this answer...

 NSDictionary *textTitleOptions = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor darkGrayColor], UITextAttributeTextColor, [UIColor whiteColor], UITextAttributeTextShadowColor, nil];
[[UINavigationBar appearance] setTitleTextAttributes:textTitleOptions];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top