Skip to content

Commit 3fddb6a

Browse files
authored
Update README.md
1 parent 2818e31 commit 3fddb6a

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Side Menu
1+
# Side Menu
22

33
[![Platform](http://img.shields.io/badge/platform-iOS-blue.svg?style=flat)](http://cocoapods.org/?q=YALSideMenu)
44
[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/Yalantis/Side-Menu.iOS/blob/master/LICENSE)
@@ -10,25 +10,25 @@ Check this <a href="https://www.behance.net/gallery/20411445/Mobile-Animations-I
1010

1111
<img src="https://d13yacurqjgara.cloudfront.net/users/125056/screenshots/1689922/events-menu_1-1-6.gif" />
1212

13-
##Requirements
13+
## Requirements
1414

15-
- iOS 7.x / 8.x / 9.x (see installation instructions)
15+
- iOS 7+
1616
- Swift 3
1717
- Xcode 8
1818

19-
##Installation
19+
## Installation
2020

21-
####Using [CocoaPods](http://cocoapods.org)
21+
#### Using [CocoaPods](http://cocoapods.org)
2222

2323
Simply add the following line to your Podfile:
2424

2525
```ruby
2626
pod 'YALSideMenu', '~> 2.0'
2727
```
2828

29-
*(CocoaPods v0.36 or later required. See [this blog post](http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/) for details.)*
29+
*(CocoaPods v1.1 or later is required)*
3030

31-
####Manual Installation
31+
#### Manual Installation
3232

3333
> For application targets that do not support embedded frameworks, such as iOS 7, SideMenu can be integrated by including source files from the SideMenu folder directly, optionally wrapping the top-level types into `struct SideMenu` to simulate a namespace. Yes, this sucks.
3434
@@ -41,7 +41,7 @@ pod 'YALSideMenu', '~> 2.0'
4141
7. Expand the "Link Binary With Libraries" group, and add `SideMenu.framework`
4242
8. Click on the `+` button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add `SideMenu.framework`.
4343

44-
##Usage
44+
## Usage
4545

4646
1. Import `SideMenu` module
4747

@@ -60,20 +60,21 @@ pod 'YALSideMenu', '~> 2.0'
6060
3. Set `preferredContentSize` in menu view controller to specify the desired menu width
6161
4. In content view controller store an animator, that will animate our menu.
6262

63-
```swift
64-
import SideMenu
65-
class ContentViewController: UIViewController {
66-
var menuAnimator : MenuTransitionAnimator!
67-
}
68-
```
63+
```swift
64+
import SideMenu
65+
class ContentViewController: UIViewController {
66+
var menuAnimator : MenuTransitionAnimator!
67+
}
68+
```
6969
5. Initialize an animator for presentation with parameters
7070

71-
```swift
72-
menuAnimator = MenuTransitionAnimator(mode: .presentation, shouldPassEventsOutsideMenu: false) { [unowned self] in
71+
```swift
72+
menuAnimator = MenuTransitionAnimator(mode: .presentation, shouldPassEventsOutsideMenu: false) { [unowned self] in
7373
self.dismiss(animated: true, completion: nil)
74-
}
75-
```
76-
If you want, for example, to dismiss your menu when a tap outside menu takes place, you should pass 'false' to 'shouldPassEventsOutsideMenu' flag and assign a 'tappedOutsideHandler'.In fact, you are free to do whatever you want when a tap outside menu occurs or, if you want to have access to your content view controller, just pass 'true' and assign 'tappedOutsideHandler' to nil.
74+
}
75+
```
76+
77+
If you want, for example, to dismiss your menu when a tap outside menu takes place, you should pass 'false' to 'shouldPassEventsOutsideMenu' flag and assign a 'tappedOutsideHandler'.In fact, you are free to do whatever you want when a tap outside menu occurs or, if you want to have access to your content view controller, just pass 'true' and assign 'tappedOutsideHandler' to nil.
7778
6. Implement class of UIViewControllerTransitioningDelegate that will return our menuAnimator from method animationControllerForPresentedController and assign it to transitioningDelegate of menu view controller(Don't forget to set .Custom modal presentation style). To dismiss menu you should return MenuTransitionAnimator(mode: .Dismissal) from animationControllerForDismissedController method.
7879

7980
```swift

0 commit comments

Comments
 (0)