The idea of implementing common iOS menu effects

Source: Internet
Author: User

Currently seen in the implementation of the side-side menu effect, the more popular there are the following three kinds: ()

1. The menu bar is covered on some main view

Attach a good source address for this effect:

http://code4app.com/ios/RNFrostedSidebar/524399706803fa3c33000001


(1) The simplest way to achieve this is to add UIView, plus a self.view-sized sub-view, with a transparent gray area outside the menu list. Later, if the current controller has a navigation bar or toolbar, this sub-view will not cover the navigation bar or the buttons on the toolbar.

(2) In order to cover the navigation bar and toolbar buttons, it appears that only on the current controller, press or modal display a new controller, and then the new controller's Self.view background color is set to transparent gray, so you can see the original controller is not blocked by the menu content.

Boy, when I tried to set the new controller's Self.view background color to transparent gray, actually found that when rotating the device direction, only the topmost controller will change direction, and the following see the content of the controller does not follow.

Here is still a paste, exactly how to display a transparent view controller:


(3) Ok, then I learned the above-mentioned source of the method, on the current controller, the display of a new mode controller, the background of the new controller is the source controller screen, and then on the background map again covered with a layer of transparent gray, made as above.


2, the main view slide left and right, along with the zoom effect

The effect has not started to learn ...



3. Drawer effect

Attach a great source repository on GitHub:

Https://github.com/mutualmobile/MMDrawerController

、



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.