Latest 1.0.1
License BSD
Platforms ios 8.0, tvos 9.0, requires ARC

Swift Version
Build Status
CocoaPods Compatible
Carthage Compatible

DGDialogAnimator is a manager allowing you to quickly display Dialogs like Toasts, Alerts or even Modal Form, with only few lines of codes.


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


Works with iOS 8+, tested on Xcode 8.2


To install the DGDialogAnimator using cocoapods

  • Add an entry in your Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'

target 'YourTarget' do

  # Pods for YourTarget
  pod 'DGDialogAnimator'
  • Then install the dependency with the pod install command.


  • Select the view to animate, its container, where the animation will start and where it will go.

let toast = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds/2, height: 100))    
DGDialogAnimator.default.animate(view: toast,
                                   in: self.view,
                                 path: DGDialogAnimator.AnimationPath(initial: .top, intermediate: .top))

let notification = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds, height: 250))    
DGDialogAnimator.default.animate(view: notification,
                                   in: self.view,
                                 path: DGDialogAnimator.AnimationPath(initial: [.top, .left], intermediate: [.top, .right]))


You can customize the component by enabling few options:

var options = DGDialogAnimator.Options()
options.hold = false
options.dismissDelay = 5
options.backdrop = false
options.blurEffectStyle = nil
// ....
DGDialogAnimator.default.animate(view: toast,
                                   in: self.view,
                                 with: options,
                                 path: DGDialogAnimator.AnimationPath(initial: .top, intermediate: .top))

Here the list of all available options :

Property type Description
backdrop Bool Tells if the background behind the animated view will dismiss the view on touch
blurEffectStyle UIBlurEffectStyle The blur effect added to the background. 3 values are available .light .extraLight .dark
coverStatusBar Bool if set to true you must NOT set the container because the component will use automatically UIWindow.
animationDuration TimeInterval How long the animation will last.
dismissDelay TimeInterval How long the animated view will hold before dismissing itself
enterAnimationCurve UIViewAnimationCurve Let you configure the animation curve when the view comes in the container
leaveAnimationCurve UIViewAnimationCurve Let you configure the animation curve when the view leaves in the container
hold Bool The view won’t dismiss after dismissDelay. It will wait a call to the dismiss() method

Built With

Fastlane is a tool for iOS, Mac, and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application.


See for more details!

This project adheres to the Contributor Covenant Code of Conduct.
By participating, you are expected to uphold this code. Please report
unacceptable behavior to [email protected].


DGDialogAnimator is licensed under the BSD 3-Clause license.

Latest podspec

    "name": "DGDialogAnimator",
    "version": "1.0.1",
    "summary": "UIView animator used to display dialog",
    "homepage": "",
    "authors": "Digipolitan",
    "source": {
        "git": "",
        "tag": "v1.0.1"
    "license": {
        "type": "BSD",
        "file": "LICENSE"
    "source_files": "Sources/**/*.{swift,h}",
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    "requires_arc": true,
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This