Questions tagged [becomefirstresponder]

170 questions
28
votes
4 answers

get notified when UITextField becomeFirstResponder

How I can get notified when UITextField becomeFirstResponder ? I can check like isFirstResponder or set to to become first Responder by becomeFirstResponder I want to get notified or handle an event when a user make this text field first…
shebelaw
  • 3,562
  • 6
  • 31
  • 48
21
votes
2 answers

_UIButtonBarStackView: breaking constraint when becomeFirstResponder sent

When jumping from one textfield to an other, get this: translatesAutoresizingMaskIntoConstraints) ( "", "
János
  • 27,206
  • 24
  • 130
  • 270
18
votes
6 answers

Swift: Become First Responder on UITextField Not Working?

I've created a custom UIViewController with one UITextField on Storyboard. On viewDidLoad, I set the UITextFIeld to becomeFirstResponder, nothing happened (no keyboards popped up). I then tried calling resignFirstResponder(), but it returned false.…
blee908
  • 10,735
  • 9
  • 31
  • 39
17
votes
4 answers

Trouble shooting becomeFirstResponder not showing keyboard for some users

I got a TextView that is supposed to show upon a button press, and let the user enter text through the keyboard. - (IBAction) changeName { changeNameBtn.hidden = YES; backBtn.hidden = YES; usernameLabel.hidden = NO; …
JOG
  • 5,438
  • 5
  • 31
  • 52
17
votes
2 answers

iOS Keyboard (inside UIRemoteKeyboardWindow) is Not Shown When UITextField Becomes First Responder in Touch ID Completion Block (iOS 10)

I've recently discovered a problem in my app that only seems to occur in iOS 10 where the system keyboard does not display when programmatically triggering a text field to become first responder inside of a completion handler -- specifically the…
Danchez
  • 865
  • 1
  • 8
  • 26
17
votes
4 answers

UITextField subview of UITableViewCell to become first responder?

I have a core data application which uses a navigation controller to drill down to a detail view and then if you edit one of the rows of data in the detail view you get taken to an Edit View for the that single line, like in Apples CoreDataBooks…
Daniel Granger
  • 1,264
  • 1
  • 15
  • 35
17
votes
4 answers

In iOS 6, -[UITextField becomeFirstResponder] doesn't work in -viewWillAppear:

In iOS 5.1 and iOS 5.0 it works, but in iOS 6.0 the keyboard does not show. - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; UITextField *textField = self.emailAddressTextField; [textField…
Jeffery Thomas
  • 40,388
  • 8
  • 88
  • 114
14
votes
3 answers

UIKeyCommands don't work when intermediary viewController contains two viewControllers

I believe this is a non-trivial problem related to UIKeyCommands, hierarchy of ViewControllers and/or responders. In my iOS 9.2 app I have a class named NiceViewController that defines UIKeyCommand that results in printing something to the…
mgamer
  • 12,296
  • 23
  • 84
  • 142
13
votes
4 answers

Keeping object on top of keyboard in the event of becomeFirstResponder or resignFirstResponder?

I currently have a UITextField on top of a keyboard. When you tap it, it should stick on top of the keyboard and move up smoothly. I don't know the exact duration and animation type of the keyboard, so it's really bumpy. Here's what I…
11
votes
4 answers

Focus on the UISearchBar but the keyboard not appear

I've read so many solution on how can i focus a searchbar to make keyboard appear when i open my search view, and all of that are like this [searchBar becomeFirstResponder]; mine is [self.searchDisplayController.searchBar becomeFirstResponder]; but…
10
votes
1 answer

TextField becomeFirstResponder Issue for tab key(Keyboard) action

I have a view in XIB where i used several text fields in it. Let say the first text field becomes first responder as soon as the view gets loaded in the window. If i press tab key in my machine's keyboard to navigate to next text field ;apart from…
Balaji
  • 261
  • 5
  • 12
10
votes
2 answers

How to show the keyboard for a UIView

I have a UIView where I want to receive keyboard input. I have tried: [self becomeFirstResponder]; But it doesn't work. I could implement a 'dirty' workaround by having a hidden UITextField and forwarding the keystokes to my UIView - but how does…
8
votes
1 answer

How to handle UITextField inside a keyboard app extension

I have added textfield (keyboardTextField) and UISwitch on top of my custom keyboard. I can set focus ON or OFF for (keyboardTextField) on the base of Switch value my code. - (void)switchToggled:(id)sender { UISwitch *mySwitch =…
8
votes
6 answers

Disable UISearchBar search icon and placeholder text animation on becomeFirstResponder

I have a UISearchBar that I want to display when the user taps a button. In the buttonPress method, I create the searchBar and add it as a subview, then call [searchBar becomeFirstResponder]. If I take out this becomeFirstResponder call, the search…
adamF
  • 901
  • 2
  • 9
  • 22
7
votes
0 answers

becomeFirstResponder cause crash UICompatibilityInputViewController

I have a messaging app. I have a UITabeView in ViewController. I implement my longPressGesture event on my Custom UITableViewCell like this to show UIMenuController on it ( copy - forward and ... )…
Mo Farhand
  • 1,104
  • 7
  • 21
1
2 3
11 12