Questions tagged [uievent]

fA UIEvent object (or, simply, an event object) represents an event in iOS. There are three general types of event: touch events, motion events, and remote-control events. It is declared in UIKit framework. It is available in iOS 2.0 and later

A UIEvent object representing a touch event is persistent throughout a multi-touch sequence. UIKit reuses the same UIEvent instance for every event delivered to the application.

You can obtain event types and subtypes from the type and subtype properties. UIEvent defines event types for touch, motion, and remote-control events. It also defines a motion subtype for "shake” events and a series of subtype constants for remote-control events, such as “play” and “previous track.” The first responder or any responder in the responder chain implements the motion-related methods of UIResponder (such as motionBegan:withEvent:) to handle shaking-motion events. To handle remote-control events, a responder object must implement the remoteControlReceivedWithEvent: method of UIResponder.

The touchesForGestureRecognizer: method, which was introduced in iOS 3.2, allows you to query a gesture-recognizer object (an instance of a subclass of UIGestureRecognizer) for the touches it is currently handling.

Source: UIEvent Class Reference

Related SO questions:

UIGestureRecognizer receive touch but forward it to UIControl as well

App crash on sendEvent method

120 questions
1
vote
2 answers

How to make image view as button in Objective-C?

For example: Collection view have four images,The user touches any cell mean its want to go to another view controller.give some idea for me friends. Take this image as example if the user click the chrome image means it go to another view…
1
vote
1 answer

How are UI events generated in WPF?

I am trying to understand how UI related RoutedEvents are generated in WPF. For instance, how does pressing the left mouse button on a control starts the tunneling of PreviewMouseDown? I couldn't find a clear answer myself. My intuition is that the…
elnigno
  • 1,751
  • 14
  • 37
1
vote
1 answer

Multiple touch location in iOS?

I want to get two touch point on multitouch. I am touching and holding one point then after i touch second point on screen. Then touches moved method called but both time i get the frirst touch location.I am not geting second touch position in…
Rajesh Maurya
  • 3,026
  • 4
  • 19
  • 37
1
vote
1 answer

Touch event forwarding in iOS

I have a UI component that I want to display in my app, in such a way that any touch event at all dismisses it (though touching the component itself would yield a different result that touching outside of it). My current solution is to have a…
Mason
  • 6,893
  • 15
  • 71
  • 115
1
vote
2 answers

Generating Remote Control Events from my app

I have two questions regarding Remote Control Events on iOS: I know that music applications are registered to remote control events and then can receive such events from the iPhone's player widget. Let's say I want my app to fire such events, is…
Gal
  • 1,582
  • 2
  • 14
  • 30
1
vote
1 answer

iOS - UIScrollView hitTest doesn't contain touches

I have a UIScrollView with UIViews inside it. The UIScrollView has two-finger scroll enabled. The UIViews each have a panGestureRecognizer. I want the following functionality: If two-touch pan --> scroll. If single touch pan && touch on a UIView -->…
rizzes
  • 1,532
  • 20
  • 33
1
vote
1 answer

How do I link all the UISlider events to one method?

I have the following method in my view-controller: - (IBAction)itemSlider:(UISlider *)itemSlider withEvent:(UIEvent*)e; { UITouch * touch = [e.allTouches anyObject]; if( touch.phase != UITouchPhaseMoved && touch.phase != UITouchPhaseBegan) …
Gal Marom
  • 8,499
  • 1
  • 17
  • 19
1
vote
1 answer

Tracking touch event without overwriting send event methods in UIWindow and UIApplication

I am trying to implement a session management for a new module to a existing code base in which the main.m, Appdelegate and UIApplication files are bundled in a library and we have no access to modify it. I have tried by adding Gesture recognizer to…
Rajesh
  • 10,318
  • 16
  • 44
  • 64
1
vote
1 answer

Nil Value in remoteControlReceivedWithEvent

I have a master-detail app. Tapping on each cell of the tableView in the MasterViewController navigates to a DetailViewController where you can download and play an audio file. I had problems keeping the AVAudioPlayer instance, single, so that…
Neeku
  • 3,646
  • 8
  • 33
  • 43
1
vote
0 answers

Pass constant string in ui-event focus function

I have to call to ui-event focus function with passing input name in it or constant value..
Kashif Mustafa
  • 1,152
  • 6
  • 20
1
vote
0 answers

Programmatically tap a view

Theres a new app on the app store called AirWeb that shows a web view on the TV and has a mouse that can tap within the web view. How can I do this also, tapping 1 view and sending the tap to a point in another view? I have tried to see if I can…
Maximilian Litteral
  • 3,059
  • 2
  • 31
  • 41
1
vote
0 answers

uiview hierarchy and manage uievent

I have layout witch is shown in the figure below. It has 2 layers. First marked as C is transparent uiview with added pan gesture recognizer. It is used to syncing setting content offset of A and B view, which are on second layer. Layer means uiview…
granan
  • 341
  • 1
  • 4
  • 18
1
vote
2 answers

Way to record and then play all UIEvents of UIApplication

Is there any way to record and then play all UIEvents of UIApplication? Main idea is to record testing scenario and then play it and compare results. I have managed to get all app events after subclassing UIApplication, but still I cant play them…
Jack
  • 21
  • 4
1
vote
1 answer

iOS action - how do i get event data from UIAction for a standard UIButton?

For UIButton, Is there a way on touchDragInside to tell what direction the gesture was in? (up, down, left, right) - (IBAction)buttonTouchedUpInside:(UIButton *)sender forEvent:(UIEvent *)event { } Thanks!
cabgef
  • 1,398
  • 3
  • 19
  • 35
1
vote
1 answer

TouchDragEnter into a UIButton

Is it possible to TouchDown outside a uibutton and then dragInside another UIButton with the UIEventTouchDragEnter or something like that? I need help with the code. I tried it with imageView but i would appreciate a solutions with buttons! Thank…
Franhu
  • 63
  • 1
  • 6