Added Android code
[wl-app.git] / iOS / Pods / ZFDragableModalTransition / README.md
1 # ZFDragableModalTransition
2
3 [![Version](https://img.shields.io/cocoapods/v/ZFDragableModalTransition.svg?style=flat)](http://cocoadocs.org/docsets/ZFDragableModalTransition)
4 [![License](https://img.shields.io/cocoapods/l/ZFDragableModalTransition.svg?style=flat)](http://cocoadocs.org/docsets/ZFDragableModalTransition)
5 [![Platform](https://img.shields.io/cocoapods/p/ZFDragableModalTransition.svg?style=flat)](http://cocoadocs.org/docsets/ZFDragableModalTransition)
6
7 <p align="center"><img src="https://raw.githubusercontent.com/zoonooz/ZFDragableModalTransition/master/Screenshot/ss.gif"/></p>
8
9 ## Usage
10
11 ```objc
12 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
13 {
14     TaskDetailViewController *detailViewController = segue.destinationViewController;
15     detailViewController.task = sender;
16
17     // create animator object with instance of modal view controller
18     // we need to keep it in property with strong reference so it will not get release
19     self.animator = [[ZFModalTransitionAnimator alloc] initWithModalViewController:detailViewController];
20     self.animator.dragable = YES;
21     self.animator.direction = ZFModalTransitonDirectionBottom;
22     [self.animator setContentScrollView:detailViewController.scrollview];
23
24     // set transition delegate of modal view controller to our object
25     detailViewController.transitioningDelegate = self.animator;
26
27     // if you modal cover all behind view controller, use UIModalPresentationFullScreen
28     detailViewController.modalPresentationStyle = UIModalPresentationCustom;
29 }
30 ```
31 ###ScrollView
32 If you have scrollview in the modal and you want to dismiss modal by drag it, you need to set scrollview to ZFModalTransitionAnimator instance.
33 ```objc
34 [self.animator setContentScrollView:detailViewController.scrollview];
35 ```
36
37 ###Direction
38 You can set that which direction will our modal present. (default is ZFModalTransitonDirectionBottom)
39 ```objc
40 self.animator.direction = ZFModalTransitonDirectionBottom;
41 ```
42 P.S. Now you can set content scrollview only with ZFModalTransitonDirectionBottom
43
44 ## Requirements
45 - iOS >= 7.1
46 - ARC
47
48 ## Installation
49
50 ZFDragableModalTransition is available through [CocoaPods](http://cocoapods.org). To install
51 it, simply add the following line to your Podfile:
52
53     pod "ZFDragableModalTransition"
54
55 ## FAQ
56
57 ### How can I show modal only part of view ?
58 The current ViewController's view still visible behind the modal, so you just set transparent color to background view.
59
60 ## Author
61
62 Amornchai Kanokpullwad, [@zoonref](https://twitter.com/zoonref)
63
64 ## License
65
66 ZFDragableModalTransition is available under the MIT license. See the LICENSE file for more info.