Questions tagged [becomefirstresponder]

176 questions
1
vote
1 answer

After deleteRows used, becomeFirstResponer() doesn't give focus to textField

After any row is deleted by deleteRows(at:with:) from my Table View, I cannot get textfield in a reusable custom cell to get focus by becomeFirstResponder() (which is called after insertRows(at:with:) is called). becomeFirstResponder() is always…
1
vote
1 answer

iOS (Swift): UITextField is **not** first responder after becomeFirstResponder method is called?

I have an array of UITextFields inside a UIViewController: @IBOutlet weak var textField1: UITextField! @IBOutlet weak var textField2: UITextField! var textFields: [UITextField] { return [textField1, textField2] } In my viewDidLoad method, I set…
ajrlewis
  • 2,968
  • 3
  • 33
  • 67
1
vote
1 answer

Keyboard appears twice when UITextField becomes first responder after custom segue performed

So the problem is: when I push a button on a source view the custom segue performed. Here is the code (pretty standard): class FirstCustomSugue: UIStoryboardSegue { override func perform() { let initalView = self.source.view as UIView? let…
1
vote
1 answer

Swift - Cannot pass user gesture from custom UICollectionViewCell to UITextField inside it

I have a custom UICollectionViewCell (let's call it MyCustomCell) that has a custom UITextField (let's call it MyCustomField) inside it that users can add text to. However, it seems no matter what I do, the tap inputs don't get from the MyCustomCell…
1
vote
2 answers

iOS - UIButton become first responder to open keyboard

I need to open keyboard on button click for UIButton (not using/for UITextField). I have tried to create custom button by overriding variable canBecomeFirstResponder but it's not working. Is there any other way to do so? Note: I want to set…
Krunal
  • 77,632
  • 48
  • 245
  • 261
1
vote
3 answers

Keyboard issue with iOS 4.2

My app works as supposed on an iPhone running iOS 4.1 but not on iOS 4.2. I have an UIInputField set to first responder but the keyboard does not show up. The becomeFirstResponder is called in the viewDidLoad method. Is it a bug or has Apple made…
AOO
  • 321
  • 1
  • 4
  • 10
1
vote
1 answer

Text field wont become first responder

I seem to have a situation, where calling BecomeFirstResponder() is not working as expected. Say i have two text boxes in a view. The first text box is the first responder at ViewDidLoad(); At the click of a button i want the second text box to…
1
vote
0 answers

Keyboard is not enabling after navigation takes place in ios

While I am navigating to the particular controller I want keyboard to enable after the navigation takes place. In IndexPageTableViewController it has a textField named searchField I need to enable the keyboard. -(void)…
1
vote
1 answer

makeFirstResponder: does not always take cursor

When I display my app with a keyboard shortcut or by tapping an icon in the status bar I set first responder. makeFirstResponder: always succeeds (returns true) with a not-nil window and a not-nil NSTextField. However it doesn't always 'take the…
glenstorey
  • 5,134
  • 5
  • 39
  • 71
1
vote
1 answer

Force UITextView cursor to the top of the view

I have a UITableView that contains a series of text input fields, which can be UITextField or UITextView controls. When a text input field is selected, the keyboard's 'Next' button is used to cycle through the fields. This all works properly except…
Pheepster
  • 6,045
  • 6
  • 41
  • 75
1
vote
1 answer

Error when try becomeFirstResponder call for UIMenuController

I have a messenger, so I want to show UIMenuController on cell long tap. I need image view to catch long press, because I have text and media messages. But I get a crash becomeFirstResponder call after I received long press gesture on iOS 8(iOS 7…
Ivan Vavilov
  • 1,520
  • 1
  • 15
  • 28
1
vote
2 answers

UITextField becomeFirstResponder block animation

I want to show a view, which contain a UITextField, and I would show automatically the keyboard with the message becomeFirstResponder. With iOS 7, there isn't any problem. But since iOS8, it doesn't work. I'm configuring the view like this : -…
1
vote
0 answers

UITextview: Place focus on becomefirstresponder

I have a UITextView which becomes first responder by tapping. The code looks like this. UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(editTextRecognizerTabbed:)]; recognizer.delegate =…
user656219
1
vote
2 answers

StackOverflow in iOS 6.1 when calling BecomeFirstResponder from inside TextFieldOnEditingDidEnd in

I'm trying to be clever with my app. I have 5 UITextField objects stacked on top of each other. I want the user to be able to enter stuff in the first UITextField and then press 'Next' on the keypad and have focus move to the next UITextField. My…
Curtis
  • 5,794
  • 8
  • 50
  • 77
1
vote
3 answers

Move From UITextField to UITextView When Return Pressed

I have several text views in my app. All but one are UITextField, and the other is a UITextView, located right in the middle of the others. This is due to this section needing much more room for the user to type and see all of what they are typing…