Latest 1.0.3
Homepage https://github.com/PierrePerrin/PPDesignLeftMenuNavigation
License MIT
Platforms ios 8.2
Authors

PPMusicImageShadow

Synopsis

PPMusicImageShadow is a view that imitates in real time the shadow blurred effect of iOS Music App.

alt tag
alt tag

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate PPDesignLeftMenuNavigation into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.2'
use_frameworks!

target '<Your Target Name>' do
pod 'PPDesignLeftMenuNavigation'
end

Manually

If you prefer you can clone the project, release the framework or use the swift files directly.

Code Example

First add a "Main" viewController on your Storyboard as a subclass of PPMenuContainerViewController and as initialviewController.

alt tag

Then add PPLeftMenuDatasource protocol to your main viewcontroller (The protocol is similar as a UITableViewDelegate protocol, but simpler)

class MainViewController: PPMenuContainerViewController, PPLeftMenuDatasource {

    var items : [PPLeftMenuItem] = [
    PPLeftMenuItem.init(WithText: "FirstItemTitle", icon: UIImage.init(named: "FirstIcon")),
    PPLeftMenuItem.init(WithText: "SecondItemTitle", icon: UIImage.init(named: "SecondIcon")),
    PPLeftMenuItem.init(WithText: "ThirdItemTitle", icon: UIImage.init(named: "ThirdIcon"))
    ]

    //Here you set 
    override func awakeFromNib() {
        super.awakeFromNib()

        self.datasource = self
        if let vc = self.storyboard?.instantiateViewController(withIdentifier: "YourViewControllerIdentifierForYourFirstItem"){
            self.contentViewController = vc
        }
    }

    func numberOfItem() -> Int {
        return items.count
    }

    func itemForRow(row: Int) -> PPLeftMenuItem {
        return items[row].leftMenuItem
    }

    func didSelectRow(atIndex index: Int, item : PPLeftMenuItem) {
        if let vc = self.storyboard?.instantiateViewController(withIdentifier: "viewControllerForSelectedRow"){

            //Here you change the viewcontroller (with a fade animation or a blur transition)
            self.setContentViewController(viewController: vc, animated: true,blurTransition: true)
        }
    }

    //Here you can add a header to the menu view
    var menuHeaderView: UIView?{
        return nil
    }

    //Here you can add a footer to the menu view
    var menuFooterView: UIView?{
        return nil
    }
}

Personalization

Personalize the menu on the awakeFromNib().

    //change the menu background
    self.backgroundImage 

    //add a background effet on the menu
     self.addBlurToBackground = true

    //The blur effect style of menu and transition
    self.blurEffect : UIVisualEffect! = //Your desire effect
    self.backgroundBlurEffect : UIVisualEffect! = //Your desire effect

Latest podspec

{
    "name": "PPLeftMenuNavigation",
    "version": "1.0.3",
    "summary": "Design left menu navigation with a blur animation.",
    "description": "Ths project is a left menu navigation with a nice a smooth animation. A blur effect on the background a the viewcontroller could be added.nThis left menu is simple to use.",
    "homepage": "https://github.com/PierrePerrin/PPDesignLeftMenuNavigation",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "": ""
    },
    "source": {
        "git": "https://github.com/PierrePerrin/PPDesignLeftMenuNavigation.git",
        "tag": "1.0.3"
    },
    "platforms": {
        "ios": "8.2"
    },
    "source_files": "PPLeftMenuNavigation/PPLeftMenuNavigation/*.{swift}",
    "resources": "PPLeftMenuNavigation/PPLeftMenuNavigation/*.{jpg,storyboard}",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This