Response cell right-swipe gesture override Func TableView (_ Tableview:uitableview, Editactionsforrowat indexpath:indexpath), [ Uitableviewrowaction]? {Let Actionshare = Uitableviewrowaction (style:. Normal, Title: "Share") {(_,indexpath) in//define sliding menu style and caption Let Actionsheet = Uialertcontroller (title: "Share to", Message:nil, Preferredstyle:. Actionsheet)//define by button Let Optionqq = uialertaction (title: "QQ", Style:. Default, Handler:nil) let optionweixin = Uialer Taction (title: "", Style:. Default, Handler:nil) Let Optioncancel = uialertaction (title: "Cancel", Style:. Cancel, Handler:nil)//Add the option operation to Actionsheet actionsheet.addaction (OPTIONQQ) actionsheet.ad Daction (optionweixin) actionsheet.addaction (optioncancel)//Show self.present (Actionsheet, Animated:true, Completion:nil)}//Configure button Color Actionshare.backgroundcolor = Uicolor.orange Let Actiondel = Uitableviewrowaction (style:. Destructive, title: "Delete") {(_, Indexpath) in//delete the corresponding data for each row Self.areai Mages.remove (At:indexPath.row) self.areaProvice.remove (at:indexPath.row) self.areas.remove (at:ind Expath.row) Self.areaType.remove (at:indexPath.row) self.visted.remove (At:indexPath.row) Delete the row from the data source Tableview.deleterows (at: [Indexpath], with:. Fade)} Let Actiontop = Uitableviewrowaction (style:. Default, Title: "pinned") {(_, _) in} actiontop.b Ackgroundcolor=uicolor (red:245/255, green:199/255, blue:221/255, alpha:1)//Return to the Slide submenu array r Eturn [Actionshare,actiondel,actiontop]}
iOS notes "cell right-swipe gesture" 2017-09-09