- swift 5.0
- Fully customized components
- Support auto-rotation
- Support IBInspectable
- Well-adapted
- iOS 10.0+
To run the example project, clone the repo, and run pod install
from the Example directory first.
class YourCustomPopupViewController: SwiftPopup {
}
yourCustomPopupViewController.show()
yourCustomPopupViewController.show(above: viewController)
yourCustomPopupViewController.show(above: viewController) {
//Handle cpmpletion.
}
yourCustomPopupViewController.dismiss()
dismiss {
//Handle cpmpletion.
}
if yourCustomPopupViewController.isShowing {
//Handle showing.
} else {
//Handle is not showing.
}
backViewColor: UIColor
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
yourCustomPopupViewController.showAnimation.duration = 2.0
yourCustomPopupViewController.showAnimation.delay = 1.0
yourCustomPopupViewController.showAnimation.springWithDamping = 1.0
yourCustomPopupViewController.showAnimation.springVelocity = 0.0
SwiftPopup is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftPopup'
// iOS 9.0+
pod 'SwiftPopup', '~> 4.2.0'
// iOS 10.0+
pod 'SwiftPopup', '~> 5.0.0'
CatchZeng, 891793848@qq.com
SwiftPopup is available under the MIT license. See the LICENSE file for more info.