Iphone Keyboard Transparency

At first I am so new to iPhone dev, and I'm very sorry if this is easy.

Is it possible to change the amount of transparency on the iPhone keyboard (or even the color, if possible).

I know that you can get a link to the keyboard view (link provided) http://www.iphonedevsdk.com/forum/iphone-sdk-tutorials/7350-adding-subviews-custimize-keyboard.html

I found this stackoverflow entry that makes me think that this can be done with animation. IPhone UIView Animation Best Practices

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 goes through the app store. I just want to try and do it. Thanks again:)

+4
source share
2 answers

In the public API, only two styles are available:

[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]; 

Hue

 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 everything will prevent the approval of your application

+12
source

If you can do this, Apple will reject your application because you are hacking objects that are part of the operating system (not to mention, I agree with this, but Apple is very sensitive to people changing the appearance of their user interface).

0
source

Source: https://habr.com/ru/post/1286632/


All Articles