First I'm so newb to iPhone dev and I'm sorry if this is easy.
Is it possible to change the amount of transparency on the iPhone keyboard (or even the color if that's possible).
I know you can acquire a reference to the keyboard view (link provided) http://www.iphonedevsdk.com/forum/iphone-sdk-tutorials/7350-adding-subviews-custimize-keyboard.html
I found this stackoverflow post which leads me to believe it could be done through an animation. iPhone UIView Animation Best Practice
but I have no idea where I would put this code.
Thanks for any thoughts and comments. Everything friendly is appreciated :)
-TK
Thanks for the comments guys. I don't care if it passes the app store though. Just want to try and do it. Thanks again :)
There's only two styles available in the public API:
[textView setKeyboardAppearance:UIKeyboardAppearanceAlert];
[textView setKeyboardAppearance:UIKeyboardAppearanceDefault];
But you can use private API methods to retrieve the keyboard implementation:
id keyboardImpl = [objc_getClass("UIKeyboardImpl") sharedInstance];
And Make it less opaque,
[keyboardImpl setAlpha:0.8f];
Tint it,
UIView *tint = [[UIView alloc] initWithFrame:[keyboardImpl frame]];
[tint setBackgroundColor:[UIColor colorWithRed:0.0f green:0.0f blue:1.0f alpha:0.3f]];
[tint setUserInteractionEnabled:NO];
[[keyboardImpl superview] insertSubview:tint aboveSubview:keyboardImpl];
[tint release];
Or even flip it:
[[keyboardImpl window] setTransform:CGAffineTransformMakeScale(-1.0f, 1.0f)];
but all will prevent your app from being approved
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With