ios - uigesturerecognizer double click on tableviewcell + segue swift -


override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) {

    if segue.identifier == "editinfo"{          let selecteditem: nsmanagedobject = items[self.tableview.indexpathforselectedrow!.row] as! nsmanagedobject          let viewcon: addviewcontroller = segue.destinationviewcontroller as! addviewcontroller          viewcon.usernameupdate = selecteditem.valueforkey("username") as! string         viewcon.emailupdate = selecteditem.valueforkey("email") as! string          viewcon.existeditem = selecteditem      } 

i tried following segue trigered on single tap

let doubletap = uitapgesturerecognizer(target: self, action: nil)        doubletap.numberoftapsrequired  = 2      doubletap.numberoftouchesrequired  = 1        cell.addgesturerecognizer(doubletap) 

check code double tap, simple.

you can put in sample project, debug, maybe else blocking code work properly.

override func viewdidload() {     super.viewdidload()      let doubletap = uitapgesturerecognizer(target: self, action: "doubletaphandler")     doubletap.numberoftapsrequired = 2     view.addgesturerecognizer(doubletap) }  func doubletaphandler() {     print("double tap") } 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -