ra1028/PathDynamicModal
소개
A modal view using UIDynamicAnimator, like the Path for iOS.
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPathDynamicModal
A modal view using UIDynamicAnimator, like the Path for iOS.
Screen shots

Animation

Explanation
This is the library that present modal with dynamic animation.
Slant of dismiss modal by tap background is depend on tap horizontal position.
Also, slant of swiping modal is depend on touch horizontal position and amount of swipe down.
If you want to change the modal dropping speed, please set the property showMagnitude or closeMagnitude.
By all means, use the Demo-project.
Installation
Simply copy & paste PathDynamicModal.swift into your project.
Or, use the git-submodule, please.
git submodule add https://github.com/ra1028/PathDynamicModal PathDynamicModal
Cocoapods has not yet supported.
Usage
- Create a instance of any UIView subclass.
- Call the show(modalView: , inView: ) of PathDynamicModal class-function or instance-function.
- For detail, please refer to Demo-project.
Functions
class func show(modalView view: UIView, inView: UIView) -> PathDynamicModal // Show modal with settings default all.
func show(modalView view: UIView, inView: UIView) // Show modal with custom settings.
func closeWithLeansRandom() // Close modal with random slant.
func closeWithStraight() // Close modal with non slant.
func closeWithLeansRight() // Close modal with right slant.
func closeWithLeansLeft() Close modal with left slant.
Property
var backgroundColor: UIColor // Default is UIColor.blackColor()
var backgroundAlpha: CGFloat // Default is 0.7
var showMagnitude: CGFloat // Default is 250.0. This affects the speed of modal dropping to show.
var closeMagnitude: CGFloat // Default is 170.0. This affects the speed of modal dropping to close.
var closeByTapBackground: Bool // Default is true
var closeBySwipeBackground: Bool // Default is true
var showedHandler: (() -> Void)?
var closedHandler: (() -> Void)?
License
PathDynamicModal is available under the MIT license. See the LICENSE file for more info.
관련 프로젝트 살펴보기
불러오는 중…