Questions tagged [becomefirstresponder]

170 questions
0
votes
2 answers

Programmatically place the Cursor inside a textField of a custom tableView header

How can you programmatically make sure that the cursor of a tableView-HeaderView-TextField gets active (i.e. is the first responder) ?? My table looks like this (i.e with the custom TextField header). So far, the cursor only gets inside the grey…
iKK
  • 4,553
  • 5
  • 45
  • 93
0
votes
0 answers

ios7 when I present a view which contains a searchbar, and then i set it becomeFirstResponder,it will appear a strange animal and I don't wanted it

Under ios7 when I present (don't push) a viewController which contains a searchbar, and then set the place holder in order to see the animal and then I set it becomeFirstResponder,it will appear a animal and I don't wanted it. Code: UISearchBar *bar…
0
votes
2 answers

UITextField resigning firstResponder too early

I have two instances of a UITextField. The returnKeyType of the first text field is UIReturnKeyNext, and the returnKeyType second text field is UIReturnKeyDone. Based of this SO answer, I'm trying resign the first responder of the first text field…
0
votes
1 answer

return being called twice in ios app

I'm trying to implement a very basic login screen in my iOS app with username and password textfields. I looked up how to have the view automatically focus on the passsword textfield after the user taps "next" upon entering a username. However,…
scientiffic
  • 8,169
  • 13
  • 68
  • 138
0
votes
1 answer

How to switch focus (becomeFirstResponder) between textfields in different parent views

I have 3 custom objects which each contains 3 uitextfields. when I press next in the keyboard I am able to pass focus to the next UITextFiled though textFieldShouldReturn and becomeFirstResponder. this is fine while they reside in the same parent…
Ben Quan
  • 639
  • 9
  • 22
0
votes
4 answers

Textfield should becomesfirstresponder after entering four digits in another textfield

I have two UITextfields as follows, If the user enter 4 digits in the first textfield, then the second textfield should becomesfirstresponder. I have tried below code, - (BOOL)textField:(UITextField *)textField…
Nazik
  • 8,393
  • 26
  • 72
  • 115
0
votes
2 answers

How to make an iOS page with keypad up?

I want to create a text message page and want to see the keyboard on page load. This is what I have which doesn't work. Can you find what I'm doing wrong? In my header file: @interface taskViewController : ViewController @property (nonatomic,…
Adam Boostani
  • 4,713
  • 6
  • 33
  • 41
0
votes
2 answers

becomeFirstResponder is triggering UIKeyboardDidHideNotification

One goal of my app is to manage multiple custom input views (from nibs) along with the regular system keyboard. One or the other will always be present. (In the example code I am only managing a single nib + the system keyboard). When swapping out…
0
votes
3 answers

how to dismiss a keyboard when there is no textfield to resignFirstResponder

in the following scenario clicking on the pencil turns the iz 1 text to be editable by making it becomeFirstResponder and the keyboard opens, I wish to close the keyboard when clicking on the "empty rows" or iz2. how can i do that? I've tried…
liv a
  • 2,854
  • 6
  • 29
  • 69
0
votes
2 answers

When textfield become first responder, gesture recogniser not responding, even after resign

I've probably missed something... First, I inherited from UITextField and added a Tap gesture recogniser to a UITextField (in the designated initialiser): UITapGestureRecognizer * ges = [[UITapGestureRecognizer alloc] initWithTarget:self…
0
votes
1 answer

UITextView becomes first responder but the pointer doesn't go there

Ok so I have a rather weird issue: My UITextView becomes the first responder and I can tell because the keyboard appears, but what happens is that the pointer doesn't show up and the text can't be edited even if you type. This is the only UITextView…
isklikas
  • 190
  • 2
  • 16
0
votes
1 answer

Using becomeFirstResponder causes cancel button to not work

I have a UISearchDisplayController (searchDisplayCtr) and a UISearchBar (searchBar). I am trying to give focus to the search bar and bring up the keyboard when I click the search icon in the alphabet scroll on the right. If I…
0
votes
1 answer

Make UITextField first responder

In a unit test I am trying to call becomeFirstResponder method on a UITextField, but I am getting NO i.e. its not becoming the first responder. The code looks as below: UITextField *textField = [self.controller.searchBar valueForKey:…
tech_human
  • 5,440
  • 14
  • 53
  • 88
0
votes
1 answer

How can I get noticed when subclassed NSSecureTextField get focus each time?

I subclassed NSSecureTextField, and overrided -(BOOL)becomeFirstResponder,but it only works well when my custom NSSecureTextField get focus at the first time.
0
votes
2 answers

UIAlertView doesn't slide up Automatically when keyboard appears on becomeFirstResponder

I have subclassed UIAlertView and inside which I am showing a textField which takes the input. When user clicks on textField the keyboard shows up and UIAlertView moves up to adjust for keyboard. But when I do [textField becomeFirstResponder] in…
nefarianblack
  • 712
  • 6
  • 16