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
1
vote
2 answers

Disable all UIPanGestureRecognizers after `touchesBegan:withEvent:`

Is there a way to disable all of the UIPanGestureRecognizers that a touch effects? I am hoping to be able to isolate all touch events to one of my subviews and have every superview ignore all the touch events, but I can only determine this after…
RileyE
  • 10,874
  • 13
  • 63
  • 106
1
vote
0 answers

Trying to filter double-tap events through a UIView

In an iOS app, I have a UIWebView which I use to display some contents and to dismiss this UIWebView I use the following mechanism: I put a DoubleTapView (subclass of UIView) on top of the UIWebView. This DoubleTapView catches the double-tap events…
Michel
  • 10,303
  • 17
  • 82
  • 179
1
vote
1 answer

Recognize tab button pressed to move to next responder

I have multiple instances of a custom class that takes inputs from keyboard. You can think of UITextField (but they are not UITextField, they are NSObject). However, they all have a property UIControl *control. These objects are instantiated and put…
Sierra Alpha
  • 3,707
  • 4
  • 23
  • 36
1
vote
1 answer

How to disable popup menu items like Select, Select All, Suggest..., Define (on UIWebView)?

How to disable popup menu items like Select, Select All, Suggest..., Define (on UIWebView)? I have found the following information on the help but don't understand how to use it: For the editing menu commands, this is the shared UIApplication …
Dmitry
  • 14,306
  • 23
  • 105
  • 189
1
vote
2 answers

UITextView UIResponderStandardEditActions Text Formatting Toggle State

How do I determine the current state of the UIResponderStandardEditActions for text formatting? For example, if I do the following: [textView toggleBoldface:nil]; How do I query the textView to find out if the state of bold is now on or off? This…
DenVog
  • 4,226
  • 3
  • 43
  • 72
1
vote
1 answer

UIScrollView ignoring/passing on 3 touch

So I have looked over a bunch of other questions that could possible be duplicates. But none of the solutions that have been mentioned seem to work. Also, the answers tend to be scattered and incomplete. So, I have a UIView inside of a subclassed…
1
vote
0 answers

How to send UIButton's dragging event

I have a UIButton, and its superView has touch events. When the button started dragging i want pass the button and keep go from its superView's touchesMoved function, thats what my problem is. i tried customize the button, and use its touch events…
relower
  • 1,293
  • 1
  • 10
  • 20
1
vote
2 answers

Is it possible to substitute body of existing method in UIWebView without subclassing

I am interesting if it possible to substitute the method body of UIWebView in a runtime? I can't subclass UIWebView For instance, I need to implement: - (void) paste:(id)sender; or - (BOOL) canPerformAction:(SEL)action withSender:(id)sender;
velkopopovizky
  • 148
  • 2
  • 7
1
vote
3 answers

Sending an event up the UIResponder chain?

I just created a custom UIViewController with some user actions like touch. I would like to handle the user interaction in the parentObject. In other words the one that created the ViewController. From other languages I am used to use Events that…
mogio
  • 843
  • 2
  • 7
  • 18
1
vote
4 answers

uiresponder next textfield becomeFirstResponder after keyEvent

I have 4 text fields horizontally. Each textFiled will allow only four characters. If user enters four characters focus should be changed to next text field with out any user interaction. By using below code,i am able to switch to next textFiled,…
Anil Kumar
  • 1,065
  • 1
  • 13
  • 24
1
vote
1 answer

How to subclass UITextView

How can I subclass UITextView in UIActionSheet to overwrite canBeforeFirstResponder to disable copy, select, and select all in UITextView. #import @class English; @protocol EnglishDelegate -…
user1120133
  • 3,244
  • 3
  • 48
  • 90
1
vote
3 answers

iOS Recognize that a touch was made but don't intercept it

I have a view that I am showing. The view appears on the same screen with UITableView. I want to dismiss the view when anywhere on the screen is touched, but I don't want to prevent that touch from getting to its target. For instance, if the user…
Brian
  • 3,571
  • 7
  • 44
  • 70
0
votes
1 answer

Why isn't my subclassed UItableView scrolling?

I'm writing an iOS 5 app (in Xcode 4.3, using Storyboards and ARC) that has some table cells that need to respond to horizontal pans. I had a table setup that worked really well but then I needed to implement the same behavior on another scene. I…
0
votes
2 answers

Adding Two Listener For UIResponder

I have two view Controllers added as a sub-view in the UIWindow. Now the problem is one of the view gets view rotation calls but second is not getting calls for view changing orientation. Now my problem is how we can get change orientation call for…
Iqbal Khan
  • 4,587
  • 8
  • 44
  • 83
0
votes
1 answer

get hold of UIResponder instance methods on UIScrollView. iPhone

on the current project I am working on, on one of the views, I have a UIView and on top of it UIScrollView which is constructed from the interface builder. I have implemented the following UIResponder instance methods: - (void)touchesBegan:(NSSet…
shebelaw
  • 3,992
  • 6
  • 35
  • 48