Questions tagged [first-responder]

In Apple Cocoa programing, the first responder is the first object in a chain of NSResponder subclasses to be called upon receiving an even such as keypress, mouseclick, etc.

409 questions
0
votes
1 answer

Assigning first-responder status failed

I have a little application with two views. What I don't understand is that I can't seemed to manage how I can manually assign the first responder status to a particular view. I have this code in awakeFromNib method. -(void)awakeFromNib{ NSView *a =…
Pidaji
  • 45
  • 2
  • 7
0
votes
3 answers

First responder is not being set in custom TableView having custom textfield

I have a table containing buttons and textfields i am creating new cell when i click or a text field or row But when i have more than one rows, it does not assign first responder to the textfield when i tap on textfield to directly to another…
Qaiser Abbas
  • 326
  • 3
  • 9
0
votes
1 answer

UITextField becomeFirstResponder is not working inside dynamic cell

I have UITextField inside the first cell of UITableView, whenever it changes the table is changing too. The problem is that when the table is updated the field loses first responder status and becomeFirstResponder doesn't make it first responder…
esp
  • 7,314
  • 6
  • 49
  • 79
0
votes
3 answers

BecomeFirstResponder() not working on UITextField

I want to focus my UITextfield in my bottom toolbar, so on ViewWillAppear I wrote the following code: textBarcode.BecomeFirstResponder (); But the textBarcode doesn't become the focus. I also tried it with a little bit of a delay, but got the same…
anguish
  • 458
  • 1
  • 7
  • 27
0
votes
2 answers

firstResponder is not getting set

After a UITextField is edited and return is pressed, I loop through and check for the next field. I get the index path of that field, then save it. Next I reload table data and when the table is being built, if the indexPath is equal to the…
JMD
  • 1,540
  • 2
  • 24
  • 56
0
votes
1 answer

UITextField nextResponder only works once

I have multiple UITextField's and am trying to click next to switch between them. I have set the tags for each one from 1-4. When I run my code, it moves to the second one, but won't move to the third. If I jump textField.tag + 2; it will jump to…
0
votes
1 answer

How to make NSPopUpButton accept firstResponder status?

I have an NSPopUpButton and even a simple subclass of NSPopUpButton. In the subclass I have: - (BOOL)acceptsFirstResponder { return YES; } - (BOOL)refusesFirstResponder { return NO; } Now it's easy enough to tell the window to make the button first…
uchuugaka
  • 12,679
  • 6
  • 37
  • 55
0
votes
2 answers

Sending an event to an NSControl underneath another NSControl if it does not handle it

I have multiple superposed controls which can handle a mouse click under certain conditions. What I want to be able to do is: The top control receives the mouseDown: event. The top control decides if it handles the mouseDown: event. If it does, do…
Form
  • 1,949
  • 3
  • 25
  • 40
0
votes
1 answer

How to make UITextView register touches when it is currently first responder?

I need a way to know when a UITextView is touched while it is first responder. I have seen some threads about this but I have never figured out how to make it work. I'm assuming there must be a way? Any input would be much appreciated thanks! rc
rick
  • 451
  • 3
  • 13
0
votes
1 answer

Make UIScrollView a first responder

I have created a barebones iOS application that adds a single UIScrollView to the Window (no ViewControllers or UIViews -- I just did this to see if I can understand what's going on.) All I want is for the UIScrollView to be notified when the device…
Rob E.
  • 194
  • 3
  • 17
0
votes
1 answer

iOS) HIding Keyboard in a cell in UITableView

-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"searchCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; …
Raccoon
  • 1,367
  • 4
  • 22
  • 45
0
votes
2 answers

Making a UILabel subview in UIScrollView to be firstResponder

I have added a label with some text and links to an ScrollView, when you tap on those links (in the label), a delegate method will call, displays a popover and show some related information. but problem starts from here, I want when you tap on…
Hashem Aboonajmi
  • 13,077
  • 8
  • 66
  • 75
0
votes
1 answer

List of all the subviews a UITouch event is forwarded to

I have a UIScrollView with some views inside. When I tap on it I want to be able to understand if the touch occurred in an clean area or in area where there is a subview. How can I do that?
Claus
  • 5,662
  • 10
  • 77
  • 118
0
votes
2 answers

Programmatically focus on UITextView is not working

Before closing the post as duplicate,believe me,i am searching this for 2 days but still nothing. I will try to be as clear as possible: I have a view with a textview.I need to set focus automatically on the textview so the keyboard ill…
Theodoros80
  • 796
  • 2
  • 15
  • 43
0
votes
1 answer

UITableViewCell has UITextField, cell can be removed but crashes when it is first responder

I have a custom UITableViewCell, which has a text field in it, the cells can be removed, then I got a problem when the table is in editing mode and the cell also got first responder for the text field, in this case it just crashes say that I cannot…
hzxu
  • 5,753
  • 11
  • 60
  • 95