Skip to content

Commit 4abf532

Browse files
author
Olga Konoreva
authored
Update README.md
1 parent 9f6f04e commit 4abf532

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ It supports following customization:
1515
- Using spring animation with params customization
1616
- Animation options like animation curve
1717

18+
All these parameters could be various in different orientations.
19+
1820
# Installation
1921

2022
## CocoaPods
@@ -31,14 +33,14 @@ github "handsomecode/InteractiveSideMenu"
3133

3234

3335
# Usage
34-
You should use basic ViewControllers for creating subclasses for implementing your side menu.
36+
To implement your side menu you should create subclasses of basic View Controllers.
3537
- ```MenuContainerViewController``` is a host for menu and content views
3638
- ```MenuViewController``` is a container for menu view
3739

38-
Also you should ensure that every menu item ViewController adopts relevant protocol.
40+
Also, ensure that every menu item ViewController adopts relevant protocol.
3941
- ```SideMenuItemContent``` is a ViewController's protocol for data that corresponds menu item
4042

41-
To setup your side menu you shoud do 3 things:
43+
To setup your side menu you need to do three things:
4244
- Provide implementation of base ```MenuViewController``` and assing it to ```menuViewController``` property
4345
- Provide implementation of menu content and assing array of content controllers to ```contentViewControllers``` property
4446
- Select initial content controller by calling ```selectContentViewController(_ selectedContentVC: MenuItemContentViewController)```
@@ -64,7 +66,7 @@ class HostViewController: MenuContainerViewController {
6466
}
6567
```
6668

67-
To show menu you should call ```showSideMenu()``` method from `SideMenuItemContent` protocol.
69+
To show menu, call ```showSideMenu()``` method from `SideMenuItemContent` protocol.
6870
```swift
6971
import InteractiveSideMenu
7072

@@ -76,7 +78,7 @@ class KittyViewController: UIViewController, SideMenuItemContent {
7678
}
7779
```
7880

79-
To change content view you should choose desired content controller and hide menu.
81+
To change content view, choose desired content controller and hide menu.
8082
```swift
8183
let index = 2 // second menu item
8284
guard let menuContainerViewController = self.menuContainerViewController else { return }
@@ -85,7 +87,7 @@ To change content view you should choose desired content controller and hide men
8587
menuContainerViewController.hideMenu()
8688
```
8789

88-
To customize animation for menu opening or closing you should update ```transitionOptions``` property that is available in ```MenuContainerViewColtroller``` class. Initial setup could be done, for example, on controller's ```viewDidLoad()```.
90+
To customize animation for menu opening or closing, update ```transitionOptions``` property that is available in ```MenuContainerViewColtroller``` class. Initial setup could be done, for example, on controller's ```viewDidLoad()```.
8991
```swift
9092
override func viewDidLoad() {
9193
super.viewDidLoad()
@@ -95,7 +97,7 @@ override func viewDidLoad() {
9597
}
9698
```
9799

98-
Also you have possibility to update customization settings, e.g. set another options for landscape orientation. To do it you should override ```viewWillTransition(to:with:)``` mehod and add desired parameters to ```transitionOptions``` property.
100+
Also you have possibility to update customization settings, e.g. set another options for landscape orientation. To do it, override ```viewWillTransition(to:with:)``` mehod and add desired parameters to ```transitionOptions``` property.
99101
```swift
100102
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
101103
super.viewWillTransition(to: size, with: coordinator)
@@ -106,7 +108,7 @@ override func viewWillTransition(to size: CGSize, with coordinator: UIViewContro
106108
}
107109
```
108110

109-
Transition options could be used to set different settings for Compact and Regular sizes as well. To do it you should implement ViewController's ```traitCollectionDidChange(_: )``` callback.
111+
Transition options could be used to set different parameters for Compact and Regular sizes as well. Implement ViewController's ```traitCollectionDidChange(_: )``` method to add these settings.
110112

111113
See [Sample](./Sample) for more details.
112114

0 commit comments

Comments
 (0)