Questions tagged [uiresponder]

The UIResponder class defines an interface for objects that respond to and handle events. It is the superclass of UIApplication, UIView and its subclasses (which include UIWindow). Instances of these classes are sometimes referred to as responder objects or, simply, responders.

The UIResponder class defines an interface for objects that respond to and handle events. It is the superclass of UIApplication, UIView and its subclasses (which include UIWindow). Instances of these classes are sometimes referred to as responder objects or, simply, responders.

There are two general kinds of events: touch events and motion events. The primary event-handling methods for touches are touchesBegan:withEvent:, touchesMoved:withEvent:, touchesEnded:withEvent:, and touchesCancelled:withEvent:. The parameters of these methods associate touches with their events—especially touches that are new or have changed—and thus allow responder objects to track and handle the touches as the delivered events progress through the phases of a multi-touch sequence. Any time a finger touches the screen, is dragged on the screen, or lifts from the screen, a UIEvent object is generated. The event object contains UITouch objects for all fingers on the screen or just lifted from it.

iOS 3.0 introduced system capabilities for generating motion events, specifically the motion of shaking the device. The event-handling methods for these kinds of events are motionBegan:withEvent:, motionEnded:withEvent:, and motionCancelled:withEvent:. Additionally for iOS 3.0, the canPerformAction:withSender: method allows responders to validate commands in the user interface while the undoManager property returns the nearest NSUndoManager object in the responder chain.

In iOS 4.0, UIResponder added the remoteControlReceivedWithEvent: method for handling remote-control events.

259 questions
0
votes
1 answer

touchesMoved:withEvent: stops to respond

I've applied this stackoverflow entry so that I can detect the touch as it moves from one view to the other. The subviews really detect the touch. However, I'm doing something more. I need the view that detected the touch to be removed from it's…
yoninja
  • 1,952
  • 2
  • 31
  • 39
0
votes
2 answers

Accelerometer didAccelerate delegate method not getting called in iOS sdk 6.0

I am developing application to get threshold how forcefully user shook iOS device. I am using iOS sdk 6.0. I tried UIResponder delegate method motionEnded:: It get called when device is shaken but do not give enough data that how forcefully some one…
abdus.me
  • 1,819
  • 22
  • 34
0
votes
3 answers

How to prevent the keyboard from appearing over a custom alert view

I am creating a custom alert view similar to a UIAlertView. What I'm running into is that when a UITextField becomes active in the background while my alert is visible, the keyboard slides up over it. If I add the alert view to the main window…
Dancreek
  • 9,524
  • 1
  • 31
  • 34
0
votes
1 answer

UIButton fail to be clicked on the calloutView of the Annotation

The problem I encountered: I click on the button, but it seems that the CalloutView received my clicking instead of the UIButton. Some explanation first: 1.the "SYSUMyAnnoCalloutView" is a MKPinAnnotationView 2.the "SYSUMyCalloutImageView" is a…
JackieLam
  • 668
  • 1
  • 7
  • 20
0
votes
1 answer

UIScrollView touch down handled by subview

I have a UIScrollView with a child UIView. I've gone ahead and added a UITapGestureRecognizer to the child view like so: // in child - (void)setup { [self addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self…
Patrick Borkowicz
  • 1,206
  • 10
  • 19
0
votes
1 answer

UITableViewCell won't become first responder (Showing UIMenuController on cell gesture)

I have an application with a UITabBar. Every tab is a UINavigationController with several UIViewControllers inside. One of those View Controllers contains a UITableView, and I want to display a floating menu for deleting the long pressed…
momo
  • 3,404
  • 6
  • 37
  • 66
0
votes
1 answer

Save events and time of its occuring in a plist iPhone

I have a UIViewcontroller with different UI elements in it. I would like to get a way to track the events occuring on that view ,its point of occurence,and the time of the event occuring without doing any hardcoding to save it on the corresponding…
Siddharth
  • 555
  • 4
  • 19
0
votes
1 answer

cocoa touch hitTest withEvent can recognize UIView subclass

I have a view with subViews, these subViews are a subClass of UIView, in the example the subClass is called ESDcelda - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { UIImage *img = [UIImage…
David Owen
  • 159
  • 1
  • 10
0
votes
1 answer

How to copy selected data from a PDF displayed in a UIWebView

I am working on a project that displays a PDF in a UIWebView. I have added another UIMenuItem to the UIMenuController in order to do various things with the text in the UIWebView that has been selected. The problem is that I am not able to access…
bbrownd
  • 525
  • 1
  • 6
  • 14
0
votes
1 answer

UITextField subclass throwing weird exception at becomeFirstResponder

I have character boxes made of my UINavigatableTextField. After each input, responder character should succeed to it's successor. Weirdly, during input of first character, if user enters character 'Q' each time different exception…
Gökhan Barış Aker
  • 4,445
  • 5
  • 25
  • 35
0
votes
1 answer

How to show APNS Device token with UILabel?

I want show a APNS device token with UILabel. So I coded below: //AppDelegate.m - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { // TODO: Pass the token to our server NSString…
Sookcha
  • 41
  • 1
  • 1
  • 5
0
votes
1 answer

hacking ios ui responder chain

I'm facing a delicated problem handling touch events. This is problably not a usual stuff to make but i think it is possible. I just don't know how... I have a Main View (A) and Main View (B) with a lot of subviews 1,2,3,4,5,... MainView …
Nuno Santos
  • 1,476
  • 3
  • 17
  • 34
0
votes
2 answers

Passing shake gesture event to the app delegate

I put the motionBegan:withEvent: method in my view controller to see if it would work, but it's not being called. In viewWillAppear, I made the view controller the first responder, and return YES from canBecomeFirstResponder. This view controller is…
Jim
  • 5,940
  • 9
  • 44
  • 91
0
votes
1 answer

Is it possible to decide which view the UITouch gets bound to?

I have several UIViews that have somewhat complex shapes that I have drawn via each UIView's drawRect: method. I have saved a reference to the path (via a CGPath property) and I am using that in my touches methods to detect whether or not the touch…
daveMac
  • 3,041
  • 3
  • 34
  • 59
0
votes
1 answer

UITextField canBecomeFirstResponder returns NO

In the method -(void)registerUser I present a modal view with 2 UITextFields and a Ok Button. After filling the UITextFields and pressing the Ok Button I call the delegate method -(void)AEMUserRegistrationVCUserName:(NSString *)un password:(NSString…
David Casillas
  • 1,801
  • 1
  • 29
  • 57
1 2 3
17
18