IOS study notes 44-implement sliding menu slidingmenu

Source: Internet
Author: User

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

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.