JLoewy
JLoewy

Reputation: 535

iPad UIBarButtonItem not obeying tint

So this is probably a very stupid question but I can't get the plain UIBarButtonItem to tint white. It is a basic UIBarButtonItem that displays the date in the top toolbar item and i want it to show up white but it is appearing like its grayed out as you can see from the two pictures of what it looks like and the IB settings I have.

I even tried setting the tint programmatically but not difference shows. Its probably something simple but i cant figure it out for the life of me. Thanks a ton for anyone who may help lead me to the answer i really appreciate it.

How the uibarbuttonitem is displayed in the app

The settings of the UIBarButtonItem

Upvotes: 1

Views: 189

Answers (1)

JLoewy
JLoewy

Reputation: 535

I ended up using the setTitleTextAttributes selector because like i assumed... it was a very straightforward easy solution

heres my fix for anyone that may stumble upon this

[_titleItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], UITextAttributeTextColor, [UIColor darkGrayColor], UITextAttributeTextShadowColor, [NSValue valueWithUIOffset:UIOffsetMake(0, -1.0)], UITextAttributeTextShadowOffset, nil] forState:UIControlStateNormal];

Upvotes: 2

Related Questions