uitableview - iOS 8 - Uitableviewcell edit items not displaying when swiped -
i have custom uitableviewcell displaying correctly , able swipe each row left. on ipad, works fine. on model of iphone, rather display 2 edit actions defined in code below, nothing displayed. row slides left, leaving nothing edit buttons should be.
func tableview(tableview: uitableview, editactionsforrowatindexpath indexpath: nsindexpath) -> [anyobject]? { let thing = things![indexpath.row] var editaction = uitableviewrowaction(style: .default, title: "edit") { (action, indexpath) -> void in tableview.editing = false self.editthing = thing self.performseguewithidentifier("thingedit", sender: self) } editaction.backgroundcolor = uicolor.graycolor() var deleteaction = uitableviewrowaction(style: .normal, title: "delete") { (action, indexpath) -> void in tableview.editing = false self.deletething(indexpath) } deleteaction.backgroundcolor = uicolor.redcolor() return [editaction, deleteaction] } func tableview(tableview: uitableview, commiteditingstyle editingstyle: uitableviewcelleditingstyle, forrowatindexpath indexpath: nsindexpath) { }
i using same code elsewhere , works fine on devices. have confirmed there no visible differences between definition of working , non-working tables in storyboard.
Comments
Post a Comment