- Fully customized components
- Support auto-rotation
- Support IBInspectable
- Well-adapted
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'
CatchZeng, [email protected]
SwiftPopup is available under the MIT license. See the LICENSE file for more info.