Latest 0.1.3
Homepage https://github.com/manGoweb/DialogView
License MIT
Platforms ios 8.3, requires ARC
Dependencies SnapKit
Authors

Highly customisable dialog (alert) view made in swift. You can customise pretty much anything prom inner paddings and margins to all colors and views.

Screenshot 1
Screenshot 2

Basic usage

let alert: DialogView = DialogView()
alert.setTitle("Dialog Title")
alert.setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a augue eget felis dictum ultrices ac a arcu.")

let button: DialogButton = alert.addButton("Ok", type: .Done)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
alert.showInController(self)

Advanced usage

let alert: DialogView = DialogView()

var attr: [String: AnyObject] = [String: AnyObject]();
attr[NSFontAttributeName] = UIFont.init(name: "HelveticaNeue-Light", size: 16)!
alert.setTitle("Dialog Title", attributes: attr)

attr[NSFontAttributeName] = UIFont.init(name: "HelveticaNeue-UltraLight", size: 14)!
alert.setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a augue eget felis dictum ultrices ac a arcu.", attributes: attr)

var button: DialogButton = alert.addButton("Accept", type: .Accept)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

button = alert.addButton("Delete", type: .Destruct)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

button = alert.addButton("Done", type: .Done)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

button = alert.addButton("Default", type: .Default)
button.addTarget(self, action: "myAlertAction:", forControlEvents: .TouchUpInside)
button.titleLabel?.font = UIFont.init(name: "HelveticaNeue-Light", size: 14)!

alert.showInController(self)

Installation

DialogView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "DialogView"

Author

Ondrej Rafaj, manGoweb.cz [email protected]

License

DialogView is available under the MIT license. See the LICENSE file for more info.

TODO

  • Different animations
  • Custom controls in the canvas
  • More predefined styles
  • Any more ideas? :)

Latest podspec

{
    "name": "DialogView",
    "version": "0.1.3",
    "summary": "Highly customisable dialog (alert) view made in swift.",
    "description": "You can customise pretty much anything prom inner paddings and margins to all colors and views. Please refer to the README.md for instructions",
    "homepage": "https://github.com/manGoweb/DialogView",
    "screenshots": [
        "https://raw.githubusercontent.com/manGoweb/DialogView/master/_orig/screenshot1.jpg",
        "https://raw.githubusercontent.com/manGoweb/DialogView/master/_orig/screenshot2.jpg"
    ],
    "license": "MIT",
    "authors": {
        "Ondrej Rafaj": "[email protected]"
    },
    "source": {
        "git": "https://github.com/manGoweb/DialogView.git",
        "tag": "0.1.3"
    },
    "social_media_url": "https://twitter.com/rafiki270",
    "platforms": {
        "ios": "8.3"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "dependencies": {
        "SnapKit": [
            "~> 0.20.0"
        ]
    }
}

Pin It on Pinterest

Share This