Abhinav
Abhinav

Reputation: 38162

Matching keyboard accessory view background color with keyboard color

I am trying to put a accessory view on top of default UIKeyboard. I want to match the background color of the accessory view to that of keyboard both for iOS 6 and iOS 7. I am trying with below RGB which is not helping.

If anyone has done this before, please suggest.

For iOS 6
myAccessoryView.tintColor = [UIColor colorWithRed:105.0f/255.0f green:114.0f/255.0f blue:125.0f/255.0f alpha:1.0f];

For iOS 7
myAccessoryView.tintColor = [UIColor colorWithRed:(81.0f / 255.0f) green:(81.0f / 255.0f) blue:(81.0f / 255.0f) alpha:0.98f]

Upvotes: 4

Views: 2997

Answers (1)

robert
robert

Reputation: 2842

For iOS7 you could use UIInputView. to support iOS6 you will have to invest some more work, basically subclassing a UIToolBar and setting the correct tintColor. See How to extend keyboard gradient on iPhone? for more information

Upvotes: 5

Related Questions