firstresponder

Where do FirstResponder methods come from?

I'm looking at IKImageDemo supplied by Apple, the rotate round-slider is linked to a setRotation: method in the FirstResponder. However, none of the objects in the project seem to HAVE such a method, and yet the code works. I'm trying copy this into my own project, and MY FirstResponder doesn't have a setRotation: method, so I'm not sur...

iPhone UITextView which is disabled becomes first responder when re-enabled

Hi, I have an application which has some text views on one of the controllers. When the application is processing these text views are disabled and have their user interaction disabled. The problem is that when the text views are re-enabled they respond to any touches made when they where disabled. This is made even worse because they...

when you resign a uitexfield keyboards first responder is it simulating hitting the return/done button?

Basically i have a uitext field that adds a string to an array when you hit the done button of the keyboard (or hit the'+' button next to the field), which I think is the behavior to be expected in the ui by users, however if they choose to close the keyboard by touching the big button behind everything that will also resign the first re...

Need multiple views to respond to a touch event in an iPhone app

Setup: I have two views that I need to respond to the touch event, and they are layered out on top of one another. View 1 is on top of View 2. View 2 is a UIWebView. View 1 is sublclassed to capture the touch event. My problem is that if I try to call the UIWebView event handlers (touchesBegan: and touchesEnded:) from within the event...

UISearchBar- change scope without greying out table?

How can I allow a change in scope without having the table grey out, the search field become first responder and keyboard popup? I simply want to refresh the data shown based on the scope. Thanks Greg ...

keyDown works but i get beeps

I just got my keydown method to work. But i get system beep everytime i press key. i have no idea whats wrong. Googled for hours and all people say is that if you have your keyDown method you should also implement the acceptsFirstResponder. did that to and it still doesn't work. #import <Cocoa/Cocoa.h> #import "PaddleView.h" #import "Ba...

Can't Call resignFirstResponder from textFieldDidBeginEditing ? (iPhone)

[myTextField becomeFirstResponder]; [myTextField resignFirstResonder]; When I do this -(BOOL)textFieldShouldReturn:(UITextField *)textField , it works. But when I use the same code inside -(void)textFieldDidBeginEditing:(UITextField *)textField , it does not work. I am certain that it is calling textFieldDidBeginEditing. I have an NS...

UITextfield is becoming focused after UIButton pressed

I have a UITextfield for entering text. A button triggers a functionality. After completion of the IBAction the UITextfield is getting focused again. After the IBAction I want to keyboard to disappear. What happends now is that due to the IBAction of the button, the keyboards disappears (I'm showing a UIAlert) and after the IBAction the ...

Why does my NSWindow only receive mouseOver events the first time?

I have an application where a borderless window is shown and hidden, using orderOut and orderFront. When it is visible, I want the it to become the key window when the mouse moves over it. So far I've done this: In awakeFromNib I have set its first responder to itself. In the window's constructor I set accepts mouse events to YES. In t...

UIButton not disabled when UITextField has focus

I have a UIButton - a submit button - that I set the enabled and disabled states and titles for. I use the submit button title to show status like @"Sending..." while my program is making an api call by disabling the button. It works fine until the edge case where someone enters a comment on a UITextField, but instead of dismissing the ...

Unwanted automatic scrolling with UIScrollView and UITextFields as subviews

The "too long; didn't read" version: Is there any way to disable the automatic scrolling behaviour of UIScrollView when telling a UITextField to becomeFirstResponder? I have a scroll view with paging enabled and several views as subviews, each subview being controlled by its own view controller. Each subview has a UITextField. The requ...

UITextField resign first responder iOS4

Hi Everybody! I have a simple piece of code that works on every system except iOS4. It's about resigning first responder for a UITextField. The text field is all wired up, and here's the code for the delegate: - (BOOL)textFieldShouldReturn:(UITextField *)textField{ [opis resignFirstResponder]; return YES; } I've tried it almo...

iPad keyboard will not dismiss if navigation controller presentation style is "form sheet".

UPDATE: This is apparently "works as intended" classed by Apple. See accepted answer below for details. Update: this question is about a behavior discovered in the iPad keyboard, where it refuses to be dismissed if shown in a modal dialog with a navigation controller. Basically, if I present the navigation controller with the followi...

Problem resigning UISearchBar's firstResponder status

Hi there, I've got a UISearchBar on my UITableView and a method -finishSearching which looks like this: - (void)finishSearching { [overlayViewController.view removeFromSuperview]; if ([sb isFirstResponder]) [sb resignFirstResponder]; myTableView.scrollEnabled = YES; } This method gets called everytime I want to st...

UISearchBar and resignFirstResponder

I have a very basic UITableView with an attached UISearchBar, and here's the flow of what happens UITableView is empty, user taps UISearchBar, and brings up keyboard. Once the user taps the Search button - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { [searchBar resignFirstResponder]; //move the keyboard out of the...

Dragging Out of a Table and Responder Chain

Hello everyone, I'm trying to build something where I can drag a person object from a UITableView into another UITableView. What I've got working so far is that when I select the item in the table to drag (UICustomTableViewCell), in the touchesMoved method, I pop the person object out of the cell and attach it to the superview. The p...

Programatically make keyboard go away

I made a text field but I didn't use Interface Builder, I did it programatically in XCode. So now I need a programmatic way to make it resign first responder so that the keyboard will go away when the user presses enter. ...

Dismissing the keyboard using firstResponder

To dismiss the keyboard I use either one of the following: [sender dismissFirstResponder] [self dismissFirstResponder] The problem is, I have a situation where the user selects a text field, and some other text field is the first responder with the keyboard showing. I want to dismiss the keyboard when this particular text field is sel...

UiSlider Does Not Response After UITextView Resigns FirstResponder

Hi All, I have an UITextView and Some UiSlider On A View. The Sliders Work Well When The View Loaded. The Problem Is They Become Very Less/Slow Sensitive After The cycle, [UITextView becomeFirstResponder]; . . [UITextView resignFirstResponder]; Why is This Happening? Any Solution? ...

NSTextView overlay causes oddities with first responder status

I have an NSTextView in an NSScrollView, and I am programmatically inserting an NSView subclass as a subview of the NSTextView. This NSView acts as an overlay, superimposing graphical information about the text beneath it. I thought it was working quite well until I noticed that the text view does not respond to right clicks. Other op...