IOS touch and event classes and Methods

Source: Internet
Author: User

1. uitouch

The phase property returns a constant of the touch phase, indicating that the touch starts, continues, ends, or is canceled. (Constant returned by phase: uitouchphasebegan/uitouchphasemoved/uitouch-phasestationary/uitouchedphaseended/uitouchphasecancelled)

The number of times the tapcount attribute is clicked on the screen.

The time when the timestamp attribute touch occurs.

View attribute, which view does the touch start.

Window attribute indicates the window in which the touch starts.

The locationinview method is used to touch the current position in the specified view.

The previuslocationview method is used to touch the previous position in the specified view.

 

2. uievent

Timestamp attribute event occurrence time

All the touch associated with the receiver in the alltouches property event

All the touches associated with a view in the touchesforview method event

All the touch associated with the window in the touchesforwindow method event

 

3. uiresponder method: core of event capturing

Touchesbegan: withevent: reports the uitouchphasebegan event when you touch your finger on the screen.

Touchesmoved: withevent: reports the uitouchphasemoved event when the finger moves on the screen.

Touchesended: withevent: reports the uitouchphaseended event when the finger leaves the screen.

Touchescancelled: withevent: The uitouchphasecancelled event is reported when the touch is canceled due to our phone call or other factors.

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.