KCSelectionDialog 1.0.0

KCSelectionDialog 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2016
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Lee Sun-hyoup.



  • By
  • kciter

KCSelectionDialog

Simple selection dialog inspired from ios-custom-alertview

Preview

Preview Image

Requirements

  • iOS 8.0+
  • Swift 3
  • Xcode 8.0

Installation

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];