hilaj hilaj - 3 months ago 7x
iOS Question

How to distinguish two UITableView having a same custom cell

Hi I have two UITableView in a UIView class and are loaded with same custom UITableViewCell. Custom tableview cell contains a UITextField. That means the two UITableView contains a UITextfield of same custom cell. When I select any of that textfield, how do I know which tableView's textfield is selected? Please help me..

UITextField *txt = ----;

txt.superView.superview will give you the required UITableView instance.
To be more clear :

UITableViewCell *cell = txt.superView;   // In your case custom cell
UITableView *yourTable = cell.superView;