Latest 1.0.0
Homepage https://github.com/kciter/KCSelectionDialog
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Foundation
Authors

Swift 3.0
Version
License
Platform
Build Status

Simple selection dialog inspired from ios-custom-alertview

Preview

Preview Image

Requirements

  • iOS 8.0+
  • Swift 3
  • Xcode 8.0

Installation

CocoaPods

use_frameworks!
pod "KCSelectionDialog"

Manually

To install manually the KCSelectionDialog in an app, just drag the KCSelectionDialog/*.swift file into your project.

Usage

Swift

let dialog = KCSelectionDialog(title: "Dialog", closeButtonTitle: "Close")
dialog.addItem(item: "I have icon :)", icon: UIImage(named: "Icon1")!)
dialog.addItem(item: "I have icon and handler :D", icon: UIImage(named: "Icon2")!, didTapHandler: { () in
    print("Item didTap!")
})
dialog.addItem(item: "I have nothing :(")
dialog.show()

Objective-C

KCSelectionDialog *dialog = [[KCSelectionDialog alloc] initWithTitle:@"Dialog" closeButtonTitle:@"Close"];
[dialog addItemWithItem:@"I have icon :)" icon:[UIImage imageNamed:@"Icon1"]];
[dialog addItemWithItem:@"I have icon and handler :D" icon:[UIImage imageNamed:@"Icon2"] didTapHandler:^{
    NSLog(@"Item didTap!");
}];
[dialog addItemWithItem:@"I have nothing :("];
[dialog show];

Latest podspec

{
    "name": "KCSelectionDialog",
    "version": "1.0.0",
    "summary": "Simple selection dialog",
    "homepage": "https://github.com/kciter/KCSelectionDialog",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "kciter": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kciter/KCSelectionDialog.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "KCSelectionDialog/*.{swift}",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This