zoonooz/ZFDragableModalTransition
소개
모달 뷰 컨트롤러를 표시하기 위한 사용자 지정 애니메이션 전환
디자인 및 미디어측정된 스타 증가
- in 24h
- -1
- in 7 days
- -2
- in 15 days
- -2
- in 1 month
- -4
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalZFDragableModalTransition

Usage
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
TaskDetailViewController *detailViewController = segue.destinationViewController;
detailViewController.task = sender;
// create animator object with instance of modal view controller
// we need to keep it in property with strong reference so it will not get release
self.animator = [[ZFModalTransitionAnimator alloc] initWithModalViewController:detailViewController];
self.animator.dragable = YES;
self.animator.direction = ZFModalTransitonDirectionBottom;
[self.animator setContentScrollView:detailViewController.scrollview];
// set transition delegate of modal view controller to our object
detailViewController.transitioningDelegate = self.animator;
// if you modal cover all behind view controller, use UIModalPresentationFullScreen
detailViewController.modalPresentationStyle = UIModalPresentationCustom;
}
###ScrollView If you have scrollview in the modal and you want to dismiss modal by drag it, you need to set scrollview to ZFModalTransitionAnimator instance.
[self.animator setContentScrollView:detailViewController.scrollview];
###Direction You can set that which direction will our modal present. (default is ZFModalTransitonDirectionBottom)
self.animator.direction = ZFModalTransitonDirectionBottom;
P.S. Now you can set content scrollview only with ZFModalTransitonDirectionBottom
Requirements
- iOS >= 7.1
- ARC
Installation
ZFDragableModalTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ZFDragableModalTransition"
FAQ
How can I show modal only part of view ?
The current ViewController's view still visible behind the modal, so you just set transparent color to background view.
Author
Amornchai Kanokpullwad, @zoonref
Swift Version
by @dimohamdy ZFDragableModalTransitionSwift
License
ZFDragableModalTransition is available under the MIT license. See the LICENSE file for more info.
관련 프로젝트 살펴보기
불러오는 중…