Capture Touch Event on UITableViewCell and after enter didSelectRowAdTindePath method

Discussion in 'iOS Programming' started by Lucagfc, Mar 8, 2010.

  1. Lucagfc macrumors 6502

    Joined:
    Sep 23, 2008
    #1
    Hi

    I want to personalize my UITableView changing background when user tap on a specific cell.
    I've a dedicated ViewController for each cell and if I implement touchesBegan method in this viewController i can change my cell background without any problem. The problem is that the method "didSelectRowAtIndexPath" of the UITableView is no longer called. How can I call it manually? I am in another viewController and I have no access to that method. or how can propagate to the touch tableView?
    Thanks a lot
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    To me, this approach seems backward. I would have tableView:didSelectRowAtIndexPath: respond to the touch event and have it trigger some method in the viewController to change the background, as well as handle anything else you need it to do.
     
  3. Lucagfc thread starter macrumors 6502

    Joined:
    Sep 23, 2008
    #3
    The problem is that the didSelectRowAtIndexPath metoh is called when i end my touch if I continue to touch without moving away my finger I can't execute my code
     

Share This Page