From 8c536570ea069e05f70492faf050ba2539298dc6 Mon Sep 17 00:00:00 2001 From: Grigory Lutkov Date: Mon, 27 Mar 2017 17:55:36 +0300 Subject: [PATCH] Update README.md --- README.md | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a355242..ae8ef43 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ iOS view controller, shows left and right views by pressing button or gesture. ## Preview - - - + + + ## Installation @@ -169,6 +169,8 @@ If you have, for example, `sideMenuController.rootViewController != nil` and you ### Quick Example +#### Programmatically + ##### Objective-C ```objective-c @@ -209,7 +211,23 @@ sideMenuController.rightViewWidth = 100.0; sideMenuController.leftViewPresentationStyle = .slideBelow; ``` -For better examples check demo projects. +#### With storyboard + +1. Create instance of LGSideMenuController +2. Create some root view controller (for example UINavigationController) +3. Create some left view controller (for example UITableViewController) +4. Create some right view controller (for example UITableViewController) +5. Now you need to connect them all using segues of class `LGSideMenuSegue` and with identifiers: `root`, `left`, `right`. + + + + + +6. You can change `leftViewWidth`, `leftViewPresentationStyle`, `rightViewWidth` and `rightViewPresentationStyle` inside LGSideMenuController's attributes inspector. There you can also find all other properties. + + + +For better examples check [demo projects](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo). ### Blur @@ -573,12 +591,6 @@ sideMenuController.leftViewSwipeGestureEnabled = false sideMenuController.rightViewSwipeGestureEnabled = false ``` -### Storyboard - -Almost all properties you can set right inside storyboard: - - - ### Handle actions To handle actions you can use delegate, blocks or notifications: @@ -699,11 +711,11 @@ LGSideMenuControllerDidHideRightViewNotification ### More -For more details see [header files](https://github.com/Friend-LGA/LGSideMenuController/tree/master/LGSideMenuController) and try Xcode demo projects: -* [Objective-C](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo_Objective-C) -* [Objective-C + Storyboard](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo_Objective-C_Storyboard) -* [Swift](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo_Swift) -* [Swift + Storyboard](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo_Swift_Storyboard) +For more details see [header files](https://github.com/Friend-LGA/LGSideMenuController/tree/master/LGSideMenuController) and try Xcode [demo projects](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo): +* [Objective-C](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo/Objective-C) +* [Objective-C + Storyboard](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo/Objective-C_Storyboard) +* [Swift](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo/Swift) +* [Swift + Storyboard](https://github.com/Friend-LGA/LGSideMenuController/tree/master/Demo/Swift_Storyboard) ## Xamarin