Skip to content

Add actions at once #14

@sgr-ksmt

Description

@sgr-ksmt

Alertift can only add action one by one for now.
It will make it possible to add actions at once.

Alertift.actionSheet(message: "Which food do you like?")
   .popover(sourceView: self.view, sourceRect: button.frame)
   .actions([.default("🍣"), .default("🍎"), .default("🍖"), .default("🍅")]) { action, index in
       if action.style == .cancel {
           return
       }
       Alertift.alert(message: "\(index). \(action.title!)")
           .action(.default("OK"))
           .show()
    }
    .show(on: self)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions