Slide-out menu

Slide-out menu

Source code introduction:

1. Easy-to-use left-swipe menu framework, supports zooming and non-zooming, with spring effect, easy to customize your own left menu, can set text and pictures

2. It is very easy to use. Just let your root view controller inherit HUSliderMenuViewController. It is highly customizable.

3. It is recommended to keep an eye on gitHub, where bug fixes and new features will be added from time to time, as well as detailed usage procedures.

PS: The attachment below is the previous version. Because the network environment is too poor, it cannot be uploaded. Please go to GitHub to download it. Sorry.

Test environment: Xcode 6.2, iOS 7.0 or above

Source code screenshot:

Source code snippet:

  1. override func viewDidLoad() {
  2. super .viewDidLoad()
  3. self.backgroundImage = UIImage(named: "bg2.jpeg" )! //Set the background image  
  4. //self.transformWithScale = false //No scaling, default scaling  
  5. //self.allowSpringAnimation = false //Do not allow spring effect, spring effect is enabled by default  
  6. //self.leftMenuBarItemTitle = "Menu" //Set the menu button text of the navigation bar. If not set, the default  
  7. //self.leftMenuBarItemImage = "" //Set the image of the menu button of the navigation bar. If not set, the default image will be used.  
  8.  
  9. let rootView = HUFirstViewController()
  10. let secView = HUSecondViewController()
  11. let thirdView = HUThirdViewController()
  12.  
  13. self.viewControllers = [rootView, secView, thirdView] //Set all controllers to be displayed on the left, do not add NavigationViewcontroller  
  14. }
  15.  
  16. override func numberOfItems() -> Int { //Number of left menus  
  17. return menuItems.count
  18. }
  19.  
  20. override func leftMenu(menu: HULeftMenu, menuItemAtIndex index: Int) -> AnyObject {
  21. let item = menu.menuItemAtIndex(index) as! HUMenuItenCell
  22. /**
  23. * Here you can set the menu style, title, icon, selected color, etc.
  24. */  
  25. return item
  26. }

Download address: http://download..com/data/2069630

<<:  Mobile Internet: One man's success depends on the sacrifice of thousands of people

>>:  Swift lazy framework

Recommend

Brand naming guide to help you reduce advertising costs by 50%

Think for 3 seconds before reading, what do you t...

Baidu bidding OCPC delivery optimization guide!

What I want to talk about today is search OCPC. I...

In-depth analysis of the operation and life cycle of Tik Tok short videos!

Table of contents 1. Product Background Product I...

You may not know these updates! Android 9.0 has these interesting features

Google has released the latest generation of Andr...

Mango TV is going further and further on the old path of CNTV

Recently, with the "breast reduction" o...

iPhone 6 surprise new discovery: big screen

In addition to iOS 8 and OS X 10.10 beta versions,...

Don't take the hot weather lightly, heat stroke is not a trivial matter

Author: Wang Changyuan, Chief Physician, Xuanwu H...

Query traffic information

Source code introduction Select the operator acco...

What are the strategies and models behind Qutoutiao’s crazy growth?

Qutoutiao launched its product in June 2016, and ...

Build the mainstream App framework in ten minutes

[[147883]] Build mainstream framework interface A...

Why can’t we stay in the last room of the hotel?

One minute with the doctor, the postures are cons...