ios - Swift UIActionSheet: Adding a second line of text and a Button -
i looking add second line of text in smaller size each of actionsheet actions. not able second line of text using \n
additionally, want have button on right hand side of each action.
how can achieve this?
let playmenu = uialertcontroller(title: title, message: message, preferredstyle: .actionsheet) let action1 = uialertaction(title: button1, style: .default, handler: { (alert: uialertaction!) -> void in self.playrecording(num) }) let action2 = uialertaction(title: button2, style: .default, handler: { (alert: uialertaction!) -> void in self.sharerecording() }) let action3 = uialertaction(title: button3, style: .destructive, handler: { (alert: uialertaction!) -> void in self.deleterecording() }) let cancelaction = uialertaction(title: cancelbutton, style: .cancel, handler: { (alert: uialertaction!) -> void in println("cancelled") }) playmenu.addaction(action1) playmenu.addaction(action2) playmenu.addaction(action3) playmenu.addaction(cancelaction) playmenu.popoverpresentationcontroller?.sourceview = self.view playmenu.popoverpresentationcontroller?.sourcerect = cgrectmake(self.view.bounds.width / 2.0, self.view.bounds.height, 1.0, 1.0) self.presentviewcontroller(playmenu, animated: true, completion: nil)
Comments
Post a Comment