Closed reecreateeduardo closed 4 years ago
Hello please kindly check example:
@IBAction func navigationItemPicker(_ sender: UIBarButtonItem) {
ActionSheetStringPicker.show(withTitle: "Nav Bar From Picker", rows: ["One", "Two", "A lot"], initialSelection: 1, doneBlock: {
picker, value, index in
print("value = \(value)")
print("index = \(index)")
print("picker = \(picker)")
return
}, cancel: { ActionStringCancelBlock in return }, origin: sender)
}
Doest it work for you?
You can see example of picker with custom button here: https://github.com/skywinder/ActionSheetPicker-3.0/blob/66394209eb07037d2c1d83fb6251677b808012ce/Example%20Projects/Swift-Example/Swift-Example/ViewControllers/SWTableViewController.swift#L179
Feel free to reopen the issue, if you still need help. 👍
@all-contributors please add @xjki for developers, question, example
@skywinder
I've put up a pull request to add @xjki! :tada:
Hi, I have tried countless options to try and change the title of the button with ActionSheetStringPicker.
Could anyone help me with that?
` @IBAction func pickerBtnClicked(_ sender: Any) { ActionSheetStringPicker.show(withTitle: "Categories", rows: item, initialSelection: 1, doneBlock: { picker, value, index in
Any ideias? really stuck