ios - editActionsForRowAtIndexPath was called but not showing EDIT and DELETE -


i have tableview in uiviewcontroller class. have implement swipeable when swipe should show edit delete, 2 action. problem is, it's going inside method when swipe, did not show 2 actions.

func tableview(tableview: uitableview, commiteditingstyle editingstyle: uitableviewcelleditingstyle, forrowatindexpath indexpath: nsindexpath) {  }  func tableview(tableview: uitableview, editactionsforrowatindexpath indexpath: nsindexpath) -> [uitableviewrowaction]? {      let editaction = uitableviewrowaction(style: .default, title: "edit") { action, index in         print("edit");     }      editaction.backgroundcolor = uicolor.bluecolor()      let deleteaction = uitableviewrowaction(style: .default, title: "delete") { (rowaction:uitableviewrowaction, indexpath:nsindexpath) -> void in         print("delete");         //  self.confirmdelete();     }      deleteaction.backgroundcolor = uicolor.redcolor()      return [editaction,deleteaction] } 

i haven't implemented tableview controller. tableview part of screen. not full screen. tried in uitableviewcontroller class, working

any please

add delegate method

func tableview(tableview: uitableview, caneditrowatindexpath indexpath: nsindexpath) -> bool {   return true } 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -