Latest 0.0.1
License MIT
Platforms ios 8.0
Dependencies SnapKit


Swift version of MMPopupView.



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.


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() {

        animationDuration = 0.3
        type = .alert

        ETPopupWindow.sharedWindow().touchWildToHide = true

        self.snp.makeConstraints { (make) in

after you customize it, you can simply use it.

  let customView = Bundle.main.loadNibNamed("CustomView", owner: nil, options: nil)?.first as! CustomView

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?


  1. Create an issue to discuss about your idea
  2. Fork it (
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Latest podspec

    "name": "ETPopupView",
    "version": "0.0.1",
    "summary": "swift-version MMPopupView.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "VolleyZ": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.1"
    "source_files": [
    "dependencies": {
        "SnapKit": [
            "~> 3.2.0"
    "platforms": {
        "ios": "8.0"
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This