I'm creating an app that needs to display the darker keyboard (UIKeyboardAppearanceDark) in iOS7 for a UIWebView text field.
Basically, I'm posting a video to Facebook (using ESSVideoShare), by logging in through a web view Facebook login page. And for the keyboard that appears when you touch the WebView is the default white keyboard in iOS7. I would like to change this to be the darker keyboard to keep the theme of the app consistent.
I managed to do this for the UITextFields by doing :
editableTextField.keyboardAppearance = UIKeyboardAppearanceDark;
But I wasn't able to find a way to access the keyboard or appearance properties of UIWebView.
This app is not going into the app store and thus I can use private APIs, if there are no public API available to achieve this.
Any help will be greatly appriciated.
Try with this and use this method in ViewWillAppear so appearance can be set before view is loading.
[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceDark];
make UIWebBrowserView implement keyboardAppearance method
Apple does not provide any property in UIWebView class to make keyboard appearance dark in UIWebView.
You may like to make background colour of keyboard dark which you can accomplish by adding a subview behind keyboard that shows and hide with keyboard appearance.
The https://github.com/meekapps/TintedKeyboard has the library which does this.
Related
I was wondering if there is any other way (some hack/trick) to change the layout/theme of NavigationBar and SearchBar without using appearance() in GMSAutocompleteViewController? I want to avoid using that because for example if I change the NavigationBar tint (background) or SearchBar text color using appearance(), it changes for all viewController inside the app.
Here is the official documentation from google: https://developers.google.com/places/ios-sdk/autocomplete#customize_text_and_background_colors
Thanks in advance!
As I searched on Google, this question has been asked by several users before, but no one answered, for example:
UIDocumentInteractionController - Change background Color and prevent status bar popup
It seems some people like me really hope to know what we can do to change the documentController's background color when it enters full screen. Now, the default is black. The thing is, UIDocumentInteractionController is not a subclass of UIViewController, but a subclass of NSObject instead, which makes it impossible to access its "view" property directly.
So I hope to know what might be done to change its background color?
When using Safari and filling out a form, there are three buttons conveniently located at the top of the keyboard labeled Previous, Next, and Done. Is there a keyboard setting that can enable those or do you have to create and program these buttons manually?
I've had some success using this library:
https://github.com/simonbs/BSKeyboardControls
There is no default property of keyboard provided in ios. You need to add toolbar for that. Then you add previous , next or done UIBarButtons in the toolbar.
When keyboard appears toolbar is also displayed above it using some animation or directly same way when it hides/disappears you have to hide the toolbar also using animations or by changing it positioning in view.
Hope it helps you.
XCDFormInputAccessoryView is an accessory which contains the features you needed. It is easy to use. Here is how it looks with keyboard
Does anyone know/have a guess as to how facebook implemented the glowing of the icon when a user taps the icon? (You can see what I mean below) It seems to me that they implemented at least part of it programmatically as the glowing actually spills over on the icon next to it. Has anyone done this or have pointers where to start? It does not seem to spill out of the UINavigationBar, however.
PS. I do know how to make the icons up on the navigation bar, just not sure how to implement the glowing...
UIButton has a property called showsTouchWhenHighlighted. When you set this to true, it puts that glow whenever you tap it.
For some reason it goes behind the icon when you use it as a custom view of a UIBarButtonItem in a UIToolbar or a UINavigationBar (contrary to if you simply set the image of the UIBarButtonItem).
I'm creating an app that uses a custom keyboard, now if I provide the default English keyboard using the same globe icon that iOS uses, it should be able to switch to the default English keyboard fine, but I'm not sure if the user can return back to my custom keyboard from the system keyboards (assuming the user has more than 1 keyboards).
Can someone please confirm if that would be possible?
Thanks
It's not. the system keyboards have no "switch to custom keyboard" button. They're not even aware you made a custom keyboard.
What is it you're trying to accomplish? Why are you building a custom keyboard? If you tell us, maybe we can suggest an alternate way to do what you need to do.
You should set an inputAccessoryView in your UITextView with a button to toggle between your custom and the standard keyboards.
Every time the user taps the button you change myTextView.inputView between your custom keyboard and nil, which restores the original keyboard.
https://developer.apple.com/library/ios/documentation/uikit/reference/UITextField_Class/Reference/UITextField.html#//apple_ref/occ/instp/UITextField/inputView
You'll also need to reassign first responder, and also try to animate it if you want:
Animating UITextInput's textInputView
What you need is making a custom keyboard check this:
App Extension Programming Guide