TOActionSheet
TOActionSheet copied to clipboard
Problem with button if title not setted
Hello. I have installed TOActionSheet via CocoaPods
With title (1 button + 1 Destructive button)
OK
let actionSheet = TOActionSheet(title: "Choose an action")!
actionSheet.style = .light
actionSheet.contentstyle = .default
actionSheet.addButton(withTitle: "Rename", tappedBlock: { print("rename") })
actionSheet.addDestructiveButton(withTitle: "Delete", tappedBlock: { print("delete") })
actionSheet.show(from: sender, in: self.navigationController?.view)

Without title (1 button + 1 Destructive button)
Not OK
let actionSheet = TOActionSheet(style: .light)!
actionSheet.contentstyle = .default
actionSheet.addButton(withTitle: "Rename", tappedBlock: { print("rename") })
actionSheet.addDestructiveButton(withTitle: "Delete", tappedBlock: { print("delete") })
actionSheet.show(from: sender, in: self.navigationController?.view)

Without title (2 buttons + 1 Destructive button)
OK
actionSheet.contentstyle = .default
actionSheet.addButton(withTitle: "Rename", tappedBlock: { print("rename") })
actionSheet.addButton(withTitle: "Move", tappedBlock: { print("move") })
actionSheet.addDestructiveButton(withTitle: "Delete", tappedBlock: { print("delete") })
actionSheet.show(from: sender, in: self.navigationController?.view)
