You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To install manually the KCSelectionDialog in an app, just drag the SelectionDialog/*.swift file into your project.
Usage
Swift
letdialog=SelectionDialog(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:{()inprint("Item didTap!")})
dialog.addItem(item:"I have nothing :(")
dialog.show()
If you want to launch the dialog at the starting point of the app, make sure you put the code inside DispatchQueue.main.async. Otherwise it will not work
overridefunc viewDidLoad(){DispatchQueue.main.async{letdialog=SelectionDialog(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:{()inprint("Item didTap!")})
dialog.addItem(item:"I have nothing :(")
dialog.show()}}