ETPopupView
Swift version of MMPopupView.
Installation
The preferred way of installation is via CocoaPods. Just add
pod 'ETPopupView'and run pod install. It will install the most recent version of ETPopupView.
Usage
If you want to create your own Pop-Up view,simply you only need to subclass from ETPopupView.
class CustomView: ETPopupView {
let SCREEN_WIDTH = UIScreen.main.bounds.width
override func awakeFromNib() {
super.awakeFromNib()
animationDuration = 0.3
type = .alert
ETPopupWindow.sharedWindow().touchWildToHide = true
self.snp.makeConstraints { (make) in
make.width.equalTo(SCREEN_WIDTH*0.8)
make.height.equalTo(214)
}
}
}
after you customize it, you can simply use it.
let customView = Bundle.main.loadNibNamed("CustomView", owner: nil, options: nil)?.first as! CustomView
customView.show()
ETPopupView
ETPopupView is a basic Pop-Up view designed to be subclassed. It provide 3 kind of animations(alert, sheet,Drop), or you can provide your own animation by override the showAnimation and hideAnimation.
enum ETPopupType {
case alert
case sheet
case custom
}
typealias ETPopupBlock = (ETPopupView) -> Void
typealias ETPopupCompletionBlock = (ETPopupView, Bool) -> Void
class ETPopupView: UIView {
open var type: ETPopupType = .alert
open var animationDuration: TimeInterval = 0.3
open var visible: Bool
open var attachedView: UIView
open var showCompletionBlock: ETPopupCompletionBlock?
open var hideCompletionBlock: ETPopupCompletionBlock?
open var showAnimation: ETPopupBlock?
open var hideAnimation: ETPopupBlock?
}Requirements
- iOS 8.0+
- Xcode 8.0+
- Swift 3.0+
Contributing
- Create an issue to discuss about your idea
- Fork it (https://github.com/VolleyZ/ETPopupView/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

