Add a shortcut menu gesture and view gesture to the view.

Source: Internet
Author: User

Add a shortcut menu gesture and view gesture to the view.

After iOS7, the shortcut menu will be slide from the bottom of the screen. I feel that this effect is good and I want to make a similar effect. This item is not highly technical, writing it once is a waste of time, so it is easy to use it as a classification. Demo address: Ghost (Note: animation uses facebook pop) Implementation Scheme: 1. added a void addpangesturewithenframe :( CGRect) endFrame to the view in classification mode; the endFrame is the position 2 where the frame will stop at the end, and then add a panGesutre and tapGesture to the view. The effect of the pan gesture is to move the view with the gesture, the tap function automatically pops up or hides the view. 3. Call [self. superview insertSubview: self. panMaskView belowSubview: self]; a tap gesture is also added to panMaskView to hide view 4. Events and view animations that notify external gestures to start or slide in delegate mode are displayed. Hidden events

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.