Latest 0.1.2
Homepage https://github.com/CatchZeng/SwiftPopup
License MIT
Platforms ios 9.0
Dependencies SnapKit
Authors

CI Status
Version
License
Platform

Features

  • Fully customized components
  • Support auto-rotation
  • Support IBInspectable
  • Well-adapted

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Effect

Usage

Create a SwiftPopup subclass.

class YourCustomPopupViewController: SwiftPopup {
}

Show

yourCustomPopupViewController.show()

Show above viewcontroller.

yourCustomPopupViewController.show(above: viewController)

Show above viewcontroller with completion callback.

yourCustomPopupViewController.show(above: viewController) {
    //Handle cpmpletion.
}

Dismiss

yourCustomPopupViewController.dismiss()

Dismiss with completion callback.

dismiss {
    //Handle cpmpletion.
}

isShowing

if yourCustomPopupViewController.isShowing {
    //Handle showing.
} else {
    //Handle is not showing.
}

BackView Color, support IBInspectable.

backViewColor: UIColor

IBInspectable

Custom animatedTransitioning, default is SwiftPopupShowAnimation&SwiftPopupDismissAnimation. If you do not like default animation, you can set showAnimation&dismissAnimation to what you want, like ActionSheetAnimation.

showAnimation: UIViewControllerAnimatedTransitioning
dismissAnimation: UIViewControllerAnimatedTransitioning

SwiftPopupShowAnimation&SwiftPopupDismissAnimation properties.

yourCustomPopupViewController.showAnimation.duration = 2.0
yourCustomPopupViewController.showAnimation.delay = 1.0
yourCustomPopupViewController.showAnimation.springWithDamping = 1.0
yourCustomPopupViewController.showAnimation.springVelocity = 0.0

Installation

SwiftPopup is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'SwiftPopup'

Author

CatchZeng, [email protected]

License

SwiftPopup is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SwiftPopup",
    "version": "0.1.2",
    "summary": "Swift Popup.",
    "description": "Swift fully customized popup view controller.",
    "homepage": "https://github.com/CatchZeng/SwiftPopup",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "CatchZeng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/CatchZeng/SwiftPopup.git",
        "tag": "0.1.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "SwiftPopup/Classes/**/*",
    "dependencies": {
        "SnapKit": []
    },
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This