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