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
7
votes
1 answer

Why does my inputAccessoryView disappear when navigating backwards?

I implemented an own inputAccessoryView within a VC that gets pushed by a UINavigationController. This is how the VC looks like: Notice the inputAccessoryView at the bottom (the white bar with the button and a text field) When I swipe from the left…
j3141592653589793238
  • 1,810
  • 2
  • 16
  • 38
7
votes
3 answers

UITextView inside a UITableViewCell, how to resign textview's firstResponder when tableView scrolls?

I created a custom UITableViewCell, and a UITextView was put inside this prototype cell. When I click on this textView, keyboard can bounce automatically. However, if I want to hide the keyboard, I will have to click Return key. It isn't quite…
Mango Ryan
  • 85
  • 5
7
votes
1 answer

Setting initialFirstResponder in a storyboarded OSX app

Similar to this question, I'm trying to set the first responder to the first of three NSTextFields in a very simple app. The advice there (set the Window's first responder in interface builder) doesn't seem to apply anymore, at least not when…
Chris
  • 3,445
  • 3
  • 22
  • 28
7
votes
3 answers

UITextView in inputAccessoryView will not resignFirstResponder

I have a view of a UIViewController which has a UITextField as a subview. The text field implements an event on UIControlEventEditingDidBegin. This event sets the inputAccessoryView of the text field and adds a "shadow" view on the view of the view…
ThomasCle
  • 6,792
  • 7
  • 41
  • 81
7
votes
2 answers

FirstResponder missing redo:

Why my FirstResponder in InterfaceBuilder's file is missing redo: connection (in Received Actions list)? undo: exists, but redo: doesn't. How could I fix it?
hockeyman
  • 1,141
  • 6
  • 27
  • 57
6
votes
4 answers

How do I resignFirstResponder when I click outside of a UITextField onto a UITableView

I am having trouble getting the keyboard in my iPhone app to go away because the UIView even when made a controller is not touchable because of the fact that I have a UITableView taking up the rest of the available screen. I was curious to know how…
Rob
  • 426
  • 8
  • 23
6
votes
1 answer

becomeFirstResponder without hiding Keyboard

I have a view that supports copy and shows the edit menu using the following code: if ([self becomeFirstResponder]) { // bring up edit menu. UIMenuController *theMenu = [UIMenuController sharedMenuController]; [theMenu…
David Beck
  • 10,099
  • 5
  • 51
  • 88
6
votes
3 answers

iOS -- is it possible to force a UILabel subclass object to become the first responder?

Is there any way to do this? I tried putting the following into the subclass: - (BOOL)canBecomeFirstResponder { return YES; } But when I sent the object a becomeFirstResponder message, it still didn't become the first responder.
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
6
votes
3 answers

Implementing Prev./Next buttons in UITableView to make first responder a UITextField in a non-visible cell

in my app I have a UITabeView with UITextFields inside every cell. However I'm having troubles implementing previous/next buttons to make the text field inside the previous/next UITableViewCell be the first responder. I've subclassed the…
BigLex
  • 2,978
  • 5
  • 19
  • 27
6
votes
7 answers

Attempt to delete row containing first responder that refused to resign

I have an iOS 6-based project that implements a UITableView. Each cell in the table view contains a UITextField allowing the user to enter information. If the user clears a text field, or deletes all input from the field, (i.e. [textfield length] ==…
Skoota
  • 5,280
  • 9
  • 52
  • 75
6
votes
1 answer

Objective-c overriding delegate with its descendant type

I have textView in my cell and sometimes during tableView scroll some weird calls happen. System make my textView first responder. I've found these calls do unwanted behavior: #0 -[UITextView canBecomeFirstResponder] () #1 -[UIView(Hierarchy)…
user500
  • 4,519
  • 6
  • 43
  • 56
5
votes
2 answers

UIButton event not handled 1% of the time: who should I blame in my responder chain?

My application tends to sometimes lose track of what responder should handle a touch event. My situation: a XIB file defining 3 views: one view as the File's Owner's view 2 extra views that are added to the view hierarchy programmatically One of…
Mick F
  • 7,312
  • 6
  • 51
  • 98
5
votes
4 answers

I want a UItextField that is in UITableViewCell to become first responder only when the cell touched

This is what I'm trying to achieve: I want a UITextField that is in UITableViewCell to become first responder only when the cell touched. I would like the text field to become the first responder only when I set it to first responder in the…
Darren Findlay
  • 2,533
  • 2
  • 29
  • 46
5
votes
1 answer

UISplitViewController maintain detail first responder for keyboard shortcuts

I'm working on adding support for keyboard shortcuts into my iOS app. It is made of a UISplitViewController, and the shortcuts are provided by its detail view controller. The master is composed of a view controller with a UITableView and UISearchBar…
Loïc Gardiol
  • 361
  • 3
  • 7
5
votes
1 answer

Getting a WebView to act exactly like Safari

(edited to give a better description of the answer I gave) I have created a very simple browser in InterfaceBuilder consisting of a nav bar and a webview. Everything works fine except when I try to tab between input fields is the webview, the focus…