Skip to content

Commit d109145

Browse files
committed
2 parents ecec8d4 + e3f5352 commit d109145

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

README.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,35 @@ Sticky and Collapsible View on top of tab bar development
55
- iOS 10.0
66
- Tab bar is visible as long as there is a sticky view controller allocated on top of it (any vc pushed at any point should not set ```hidesBottomBarWhenPushed``` to ```true```.
77

8-
Conform to ```StickyViewControllerSupporting``` from your custom tab bar controller
8+
Subclass ```StickyViewControllerSupportingTabBarController``` from your tab bar controller.
99

10-
# Implement following properties:
10+
# Override following properties:
1111
```
12-
var collapsedHeight: CGFloat (Set it to minimised view's height you want)
13-
var collapsableVCFlow: ExpandableViewController? (keep it as optional)
14-
```
15-
16-
# Do not override or implement following methods:
17-
```
18-
func configureCollapsedTrainingView(withChildViewController childViewController: Expandable)
19-
func removeCollapsedView(withAnimation: Bool, duration: TimeInterval)
12+
override var collapsedHeight: CGFloat (Set it to minimised view's height you want)
13+
override var animationDuration: TimeInterval (Set it to general animation duration)
2014
```
2115

2216
# Configure a ViewController in collapsed state as following:
2317

2418
```
25-
if let tabBarController = tabBarController as? StickyViewControllerSupporting {
19+
if let tabBarController = tabBarController as? StickyViewControllerSupportingTabBarController {
2620
let viewControllerToStick = SampleChildViewController() // example VC
2721
tabController?.configureCollapsedTrainingView(withChildViewController: viewControllerToStick)
2822
}
2923
```
3024

31-
Any view controller to have sticky behaviour must conform to ```Expandable``` and implement a ```minimisedView``` outlet.
25+
Any view controller to have sticky behaviour must conform to ```Expandable``` and implement a ```minimisedView```.
3226

3327
Collapse sticky view from the view controller that conforms to ```Expandable``` as following:
3428

3529
```
36-
expander?.collapseCollapsibleVC(duration: 0.5)
30+
expander?.collapseCollapsibleViewController()
3731
```
3832

3933
Remove sticky view from the view controller that conforms to ```Expandable``` as following:
4034

4135
```
42-
expander?.removeCollapsedView(withAnimation: true, duration: 0.5)
36+
expander?.removeCollapsibleViewController(animated:)
4337
```
4438

4539
# Pending Improvements:

0 commit comments

Comments
 (0)