I am finding trouble to set title for button of action picker item.
ActionSheetMultipleStringPicker.show(withTitle: "Select Nationality", rows: [
nationalityArray], initialSelection: [selectedNationalityIdStr],
doneBlock: {
picker, indexes, values in
let selectedEmirate = "\(values)"
self.btnNationality.setTitle(selectedEmirate, for: .normal)
print("values = \(values)")
print("indexes = \(finalIntId)")
print("picker = \(picker)")
return
}, cancel:
{
ActionMultipleStringCancelBlock in return
}, origin: sender)
the print of Values inside the Action sheet picker is this
values = Optional(<__NSSingleObjectArrayI 0x600001ba1740>(Expat)
so when I write this below line to set title for a UIButton then it is setting up whole
self.btnNationality.setTitle("\(selectedEmirate)", for: .normal)
As you can see here, it is taking whole values string instead of only "expat":
Some one help me setting up only "expat" from the values of my action sheet picker please