Closed quintonpryce closed 6 years ago
You have to initialize it with the UIButton
look at example:
https://github.com/skywinder/ActionSheetPicker-3.0/blob/c78d7a8af26eb9e5f22ecb849c54804d6fd31be1/Example%20Projects/Example-for-iOS-7-and-6/Example/Classes/OldActionSheetPickerViewController.m#L186
your code should looks like this:
let button = UIButton(type: .custom)
//initalize your bar button there:
let buttonItem = UIBarButtonItem(customView: button)
picker?.setDoneButton(buttonItem)
Feel free to reopen the issue, if you still need help. 👍
Tried setting up an ActionSheetCustomPicker and I needed an action on done. The button title will change but the selector won't hook up.
picker?.setDoneButton(UIBarButtonItem(barButtonSystemItem: .save, target: self, action: #selector(Class.method(_:))))
I ended up using the actionSheetPickerDidSucceed() callback.