Latest 1.0.0
Homepage https://github.com/Meniny/Dialog
License MIT
Platforms ios 9.0
Frameworks Foundation, UIKit
Authors

Dialog

VersionAuthorBuild PassingSwift
PlatformsMIT
CocoapodsCarthageSPM

What’s this?

Dialog is a delightful dialog view for iOS written in Swift.

Requirements

  • iOS 9.0+
  • Xcode 8 with Swift 3

Preview

Dialog

Loading

Installation

CocoaPods

pod 'Dialog'

Contribution

You are welcome to fork and submit pull requests.

License

Dialog is open-sourced software, licensed under the MIT license.

Samples

Minimum Usage

let d = Dialog.alert(title: "Greetings", message: "Hi there! How's going?")
d.addAction(title: "Done", handler: { (dialog) -> (Void) in
    dialog.dismiss()
})
d.show(in: self)

Image & Actions

let d = Dialog.alert(title: "Dialog", message: "Check out my avatar!", image: #imageLiteral(resourceName: "avatar"))
d.rightToolStyle = { (button) in
    button.setImage(#imageLiteral(resourceName: "share"), for: .normal)
    button.tintColor = .lightGray
    return true
}
d.rightToolAction = { (button) in
    d.addAction(title: "Done", handler: { (dialog) -> (Void) in
        dialog.dismiss()
    })
}
d.addAction(title: "Add a Button", handler: { (dialog) -> (Void) in
    dialog.addAction(title: "Remove the Last Button", handler: { (dia) -> (Void) in
        dialog.removeAction(at: dia.actions.count - 1)
    })
})
d.show(in: self)

Loading

let d = Dialog.loading(title: "Logging in", message: "Please wait...", image: #imageLiteral(resourceName: "avatar"))
d.show(in: self)
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 3, execute: {
    d.dismiss()
})

Latest podspec

{
    "name": "Dialog",
    "version": "1.0.0",
    "summary": "A delightful dialog view for iOS written in Swift",
    "description": "Fire is a delightful dialog view for iOS written in Swift.",
    "homepage": "https://github.com/Meniny/Dialog",
    "license": "MIT",
    "authors": {
        "Meniny": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Meniny/Dialog.git",
        "tag": "1.0.0"
    },
    "social_media_url": "https://meniny.cn/",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Dialog/*.*",
    "public_header_files": "Dialog/Dialog.h",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This