LeadKit/TITransitions
Grigory Boyko fffa5aa6eb feat: update version 2022-09-26 14:33:11 +03:00
..
Assets Add SPM with TITransitions and TIUIKitCore 2020-08-09 13:05:08 +03:00
Sources Add SPM with TITransitions and TIUIKitCore 2020-08-09 13:05:08 +03:00
README.md fix: revert readme file 2021-06-17 13:17:52 +03:00
TITransitions.podspec feat: update version 2022-09-26 14:33:11 +03:00

README.md

TITransitions

Version Platform License

Set of custom transitions to present controller.

PanelTransition

Use to present ViewController from the bottom.

Usage

let panelTransition = PanelTransition(presentStyle: .halfScreen)

let childController = UIViewController()
childController.view.backgroundColor = .white
       
childController.transitioningDelegate = panelTransition
childController.modalPresentationStyle = .custom

rootController.present(childController)

Customization

To customize panel transition behaviour use the PanelTransition's constructor.

PanelTransition(presentStyle: PresentStyle, //required
                panelConfig: PanelPresentationController.Configuration = .default,
                driver: TransitionDriver? = .init(),
                presentAnimation: PresentAnimation = .init(),
                dismissAnimation: DismissAnimation = .init())
  1. PresentStyle - defines a position of ViewController:

    • fullScreen
    • halfScreen
    • customInsets(UIEdgeInsets)
    • customHeight(CGFloat)
  2. PanelPresentationController.Configuration - defines a background color of back view and a tap gesture:

struct Configuration {
  let backgroundColor: UIColor
  let onTapDismissEnabled: Bool
  let onTapDismissCompletion: VoidClosure?
  1. TransitionDriver is responsible for swipe gesture.
  2. PresentAnimation and DismissAnimation defines present and dismiss animations.

Installation via SPM

You can install this framework as a target of LeadKit.

License

TITransitions is available under the Apache License 2.0. See the LICENSE file for more info.