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
8
votes
2 answers

how do i make UIKeyInput make repeated deleteBackwards calls

Currently I am using UIKeyinput but it is only sending a single delteBackward event even when I hold down the delete key for a long time. How can I make it send me multiple event calls when I hold delete down for a long time?
Tom Dev
  • 1,114
  • 8
  • 18
8
votes
4 answers

Why UIViewController is a subclass of UIResponder?

What's the purpose for making UIViewController a subclass of UIResponder? Was it done solely to pass the rotation events? I could not find any definitive info on that in the docs. Update I understand that if something is made a UIResponder, this…
adubr
  • 779
  • 7
  • 21
7
votes
1 answer

Custom remote event handling in app from iOS lock screen

How does spotify handle custom remote events? Currently on iPhone 6 running iOS 8.1.3 and spotify version 2.4.0.1822 I get the following controls on the lock screen when I turn on spotify radio. Ive tried reading all docs pertaining to remote…
johnny peter
  • 4,634
  • 1
  • 26
  • 38
7
votes
3 answers

iOS - childViewController not receiving events

Newest Update: I created a brand new project that is built the exact same way as below. However, this test project actually works just fine even though it seems to be the same... One thing I've noticed is that the parent view controller in the…
6
votes
2 answers

UIWebView without Copy/Paste and selection rectangle when showing documents

In my App I want to disable the Copy/Paste/Cut of contents that are showed by a UIWebView object. To achieve this, I created a UIWebView subclass and overrode the - (BOOL)canPerformAction:(SEL)action withSender:(id)sender method: #pragma mark -…
Eduardo Coelho
  • 1,953
  • 8
  • 34
  • 60
6
votes
2 answers

UIView, its superview and touchesBegan:

Suppose I have a UIViewController subclass that takes care of some UIViews. These UIViews are added as subviews of the UIViewController's view property): UIViewController: - (void)viewDidLoad { UIImageView *smallImageView... [self.view…
Eduardo Coelho
  • 1,953
  • 8
  • 34
  • 60
6
votes
3 answers

Touch events are delayed near left screen edge on iOS 9 only. How to fix it?

I am developing a keybaord extension for iOS. On iOS 9 the keys react imediatelly except for keys along left edge of the keyboard. Those react with around 0.2 second delay. The reason is that the touches are simply delivered with this delay to the…
Rasto
  • 17,204
  • 47
  • 154
  • 245
6
votes
4 answers

Is there any way to disable predictive bar of keyboard in ios 8?

So we have predictive bar in iOS 8 but it covers my input field above the keyboard. I found only one solution to hide it by setting correction of textView to NO. But it turns off correction as well which is not good.Any suggestions?Is there any api…
efimovdk
  • 368
  • 4
  • 16
6
votes
6 answers

UIMenuController with custom item not working with UICollectionview

I have added custom menu controller when long press on UICollectionViewCell [self becomeFirstResponder]; UIMenuItem *menuItem = [[UIMenuItem alloc] initWithTitle:@"Custom Action" …
Heena
  • 2,348
  • 3
  • 32
  • 58
5
votes
2 answers

How do I add the UIApplicationDelegate to the end of the UIResponder chain?

I'm trying to provide an IBAction method for common functionality that is required at various parts of the app. i.e. Login is implemented modally, and if it succeeds results in a notification that allows all loaded view controllers to react to this…
ohhorob
  • 11,695
  • 7
  • 41
  • 50
5
votes
2 answers

iOS 9 - Keyboard pops up after UIAlertView dismissed

I have a strange visual bug that only affects iOS 9 devices: My app’s login UIViewController runs off and gets an OAuth token when you hit the button, much like you’d expect. If the response from my API returns a specific status code, I pop up a…
Luke
  • 9,512
  • 15
  • 82
  • 146
5
votes
1 answer

Example of UITextField ResignFirstResponder with Monotouch

I'm a newbie. I can't figure out how and where to call ResignFirstResponder to get rid of the keyboard when the user finished entering the text in an UITextField. I'm a bit confused by the UIResponder class. Mono documentation says: "To dismiss the…
Tajomaru
  • 115
  • 1
  • 10
5
votes
2 answers

Forward touches other than double tap to UITextView

I have a UITextView on top of that i have multiple UIView. Any touch action on UIView can associated to corresponding IBAction. In my scenario double tap gesture need to be associated to UIView's IBAction, any other touch apart from this needs to be…
5
votes
2 answers

UIButton is not receiving actions behind UIScrollView

I put UIButton inside UITableViewCell in UITableView that is behind UIScrollView. I subclassed UIScrollView to forward touches to UITableView. So method from UITableViewDelegate didSelectRow is calling properly. The problem is that UIButton inside…
5
votes
2 answers

iPhone UIView touchesMoved: withEvent: does not get called on UIView with gesture recognizers

I added a UIView that relied on TouchesMoved: events to drag touches. There's a long press, tap, rotate and pinch gesture recognizers already present within the same view controller. I'm running into an issue where the view receives touchesBegan:…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
1 2
3
17 18