Third-party drawer effect

Source: Internet
Author: User

Third-party drawer effect

1. The basic principle of the drawer effect applies the parent-child view hierarchy, the view's position change, the animation, the gesture operation and so on main knowledge points. This effect can be achieved by mastering the basics and using it flexibly.

> Parent-Child View hierarchy: Insert a child view at a specified level [view Insertsubview:atindex:]

> Change of view Position: adjusted by the Frame,center property of the view

> Animation: can use UIView or Calayer animation, here mainly using the UIView animation method [UIView animatewithduration: ...]

> Gesture operation: Mainly used to Uiswipegesturerecognizer, Uipangesturerecognizer. Complete the drawer switch by clicking, or swiping, and dragging the gesture.

In addition to the left and right side of the slide effect, usually in the app similar to the news column click, the content of the switch effect is also called the drawer effect.

2. Other third party open source drawer effect

> Residemenu

Https://github.com/romaonthego/RESideMenu

High star values in the open Source Library.

Support IOS6 above

News client similar to NetEase

Supports smaller or smaller drawer effects

However: in the drawer view, if you need to use the tableview and the proportion of the view you need to implement

> Mutual Mobile Drawer Controller

Https://github.com/mutualmobile/MMDrawerController

Optional drawer animation effect

Drawer view is TableView, no need to implement it yourself

Pure Code Implementation

> ECSlidingViewController2

Https://github.com/ECSlidingViewController/ECSlidingViewController

High Star Value

Just achieve the basic drawer effect, but also to meet the development needs

Supports pure code and visualization

> Swrevealviewcontroller

Https://github.com/John-Lluch/SWRevealViewController

The code is cleaner and more simple

Three-layer drawer possible

Better control of the ratio of left and right drawers

> Pprevealsideviewcontroller

Https://github.com/ipup/PPRevealSideViewController

More flexible

Most use storyboard to create

However: dependency is large, must use Cocoapods, need to import the library file more

Gesture support is not working well.

> Yrsideviewcontroller

Https://github.com/YueRuo/YRSideViewController

Low Star Value

People develop, can see understand. can also meet development needs

The above is a few common drawer effect of third-party open source, according to the actual project needs to choose the appropriate library, recommended the use of 1,2,6 three.

Third-party drawer effect

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.