Sliding left and right to switch out menu or sub-interface is now increasingly used in a variety of mobile applications, such as Facebook. Today John's project on GitHub is used to implement this function first:
In operation, you can click the menu button at the top to call out the left and right hidden view, or you can slide the main view to call out!
Implementation:
1. to download or clone the project to the local device in the previous connection, we need two files named swrevealviewcontroller under the swrevealviewcontroller folder. H and swrevealviewcontroller. m, drag this folder into our own project and select copy... you can!
2. Engineering Structure Analysis
The viewcontroller under the rightpage group corresponds to the orange view in 3, the FrontPage group corresponds to the main view in 2, and the mainmenu group corresponds to the left hidden menu in 1. The structure is set and initialized in appdelegate.
3. you can set to show only the hidden menu on the left or view on the right, or both the left and right, as required. The implementation method and instructions are provided in the project source code that is attached, you can download, use, or improve it!
Project source code: Download
To join our QQ group or public account, please refer:Ryan's
Zone public account and QQ Group
At the same time, you are welcome to follow my Sina Weibo chat with me:@ Don Ren _ Ryan