iOS Keyboard remove iPhone iPad - ios

Something is driving me nuts, may be somebody can help. I am currently testing something in a Universal app with a textField. I defined an action on my TextField (with didEndOnExit)
- (IBAction)textFieldTouched:(UITextField *)sender {
[self.textFieldEnter resignFirstResponder];
_textFieldContent.text = _textFieldEnter.text;
_textFieldContent.hidden=NO;
NSLog (#"Content of field : %#", _textFieldContent.text);
}
When I use it on my iPhone iOS7, I touch the textField, the keyboard appears, I type something, I hit return, the keyboard goes.
When I use it on my iPad iOS6, I touch the textField, the keyboard appears, I type something, I hit return, nothing happens. In order to have the keyboard go away, I need to hit the down-right little keyboard.
It was working on other apps I wrote in iOS6, so why not now ? I have tried to auto-enable return key for the ipad (what is even not enabled for the iPhone) but it doesn't change anything.
Can't be a big thing but it's irritating.
Thanks for your help.

Related

XCode, objective C - Keyboard WILL NOT SHOW

I've taken over the work on an iOS app, I've managed to work quite well with it thus far adding new functionality despite not being a trained iOS developer. However I've hit a patch where I simply cannot get the keyboard to show on screen when I tap on a UITextfield, there are areas of the app where it works but any new areas I add this simply will not work. Is there a standard bit of code that controls showing the keyboard when you tap a text field?
Need help
Keyboard opens up automatically unless you forced to not open.
You can check following, See screenshots.
Enable is checked
User Interaction Enable is checked
If you are checking on simulator try “command + k” from keypad
textFieldShouldBeginEditing delegate returns TRUE
-(BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
return TRUE;
}
Are you running on a simulator or a real device?

Disable microphone button in UITextField keyboard

I have a UITextField, and the keyboard shows a mic button, which I'd like to disable. I'm especially concerned that it shouldn't show on iPhone X.
I already disabled the Emoji keyboard by setting the keyboard type to "ASCII Capable". Is there another setting to remove dictation?
We are talking about the mic symbol in lower right corner on an iPhone X.
You should not remove it since this is where users of an iPhone X are expecting it.
Also you can not remove the keyboard switcher on the left.
only if you use a custom view for the keyboard, but why?
As you can see on any other iPhone the mic key is still in the same position.
By changing type of keyboard you can discard things you don't want
textField.keyboardType = UIKeyboardTypeEmailAddress;
above one not exact solution but still that can give some idea regarding keyboard type
Hope this will help you

Assign self to UITextFieldDelegate works in iOS 8 not in iOS 7

In the past i have done subclassing of UITableView and UICollectonView many times, in which i have assigned self to the delegate and datasource, and it worked fine.
Today i tried to make subclass of UITextField and in that I am assigning self to its delegate as
self.delegate = self
where delegate is inherited from UITextFiled.
In above case this is hanging the App forever in iOS 7, but works for iOS 8.
Another surprising thing is, when i try to input the text in it from Hardware keyboard then it works fine but it get hanged on typing characters from On-Screen keyboard.
What may be reason of this, Can any one help me to understand?
I was having a similar issue and I figured it out. The simulator will not raise the keyboard by default anymore. If there is a hardware keyboard available and detectable (for example on a MacBook) the simulator will look for input from it and the simulated iPhone keyboard will not raise. This gives the appearance of a problem with the delegate. All you have to do is in the Simulator's Hardware menu, under Keyboard, unselect the option for "Connect Hardware Keyboard". I hope this helps.

UITextField can send its action twice. Is this an iOS bug, or did I make an error?

In iOS, I have a UITextField in a UITableViewController scene that is governed by a Navigation Controller. All static cells. The text field has the "Clear on editing" flag switched on. I want to get and save the value entered in the field, so I have the -editingDidEnd: action call my saveData: method in the custom UITableViewController subclass. If I click out of the text field, all is well. However, if I back out of the scene using the Back navigation button, then saveData: gets called twice. Once with the entered value, and a second time with an empty value. This appears to be incorrect behavior.
I've made a demo project and posted it to GitHub here: https://github.com/davehirsch/BugDemo
Am I doing something wrong? Is this an iOS bug? It seems unlikely that it's a bug nobody else has found (and I've looked around for others reporting similar things). I'm running the latest non-beta versions of Xcode and OS X, and the bug is happening in the iOS Simulator (but I'm not sure if it would happen on a real device, I guess).
Yes you are right. It looks like a bug in UINavigationController.
Before and after animation the method [UITextField resignFirstResponder] is called before and after animation. The first call is done by [UINavigationController popViewControllerAnimated:], and the second one in [UINavigationConteoller navigationTransitionView:didEndTransition:fromView:toView:] that call [UIView(Hierarchy) _removeFirstResponderFromSubtree].
Looks like your text field hasn't resigned yet as a first responder before animation ends.
[EDIT]
I recommend to look at rdelmar comment.

keyboard language button in UITextView

Just noticed that in UITextView keyboard comes without change language button, unlike in UITextField. Why Apple removed this button from UITextView keyboard? Is there any way to enable this button? I want people to be able to write notes on any keyboard language added in phone settings.
EDITED: Maybe it will help somebody in the future. Just noticed that I set keyboard type to UIKeyboardTypeAlphabet and this option eliminates language button. Closing this question.
P.S. I have 3 languages enabled in test iPhone.
You are completely wrong. there is no difference in UIKeyboard in iOS whatsoever. It only depends on what keyboard types you use.
UIKeyboardTypeDefault and UIKeyboardTypeEmailAddress and UIKeyboardTypeTwitter all have those.
You set it like this:
txtField.keyboardType = UIKeyboardTypeTwitter;
UIKeyboardTypeDefault is obviously the default one for any UITextView or UITextField in iOS.
For anyone have this problem even when using UIKeyboardTypeDefault on a UITextView, go into the storyboard and make sure "Secure Text Entry" is unchecked. After unchecking this, the keyboard selector will return as well as the quick type keyboard.

Resources