ios - Tableview custom cell did select items not working -
i trying implement segue when user taps cell have move new view controller
the problem method didselectrow not being called
i have set delegate , datasource table view too
- (nsinteger)numberofsectionsintableview:(uitableview *)tableview { return 1; } - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { nslog(@" table vie cell----%lu",(unsigned long)_orderid.count); return _orderid.count; } - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { int section = [indexpath section]; int row = [indexpath row]; nsstring* cellidentifier = @"cell"; tableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; cell.userinteractionenabled = yes; if(_orderid != null) { // set tag indexpath.row can access later [cell settag:indexpath.row]; nslog(@"%@ order id tv",_orderid); nslog(@" order id tv %@",_orderid[indexpath.row]); cell.orderidlbl.text=_orderid[indexpath.row]; //cell.orderidlbl.text =_orderid[indexpath.row]; cell.datelbl.text =_date[indexpath.row]; cell.pricelbl.text =[nsstring stringwithformat:@" ₹ %@",_totprice[indexpath.row]]; //cell.viewbutton.tag =indexpath.row; } //cell.nametxtv.text=[_nametb objectatindex:indexpath.row]; //cell.buynowprice.text=[_buytb objectatindex:indexpath.row]; //cell.regularprice.text=[_regtb objectatindex:indexpath.row]; //cell.lowestoff.text=[_lowesttb objectatindex:indexpath.row]; return cell; } -(void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { [self performseguewithidentifier:@"i1" sender:self]; }
make sure have segue identifier @"i1"
console log check if method being called or not
remove delegate , set again programatically
Comments
Post a Comment