/** Payment button event on cell*/-(Ibaction) Paymentbuttonclick: (UIButton *) Sender {/** * @author songxing, 15-07-31 10:07:26 * * 7, 8 the parent-class relationship on the cell is inconsistent*/Cpmyordervc_cell*cell; CGRect Buttonrect=Sender.frame; for(Cpmyordervc_cell *cinch[Self.tableview Visiblecells]) { if(Cgrectintersectsrect (Buttonrect, cell.frame)) {cell=C; }} Nsindexpath* Path =[Self.tableview Indexpathforcell:cell]; Cprouteorderentity*order =Self.orders[path.row]; //Compare departure date and current dateNSDateFormatter *fmt =[[NSDateFormatter alloc] init]; Fmt.dateformat=@"YYYY-MM-DD HH:mm:ss"; NSDate*orderstarttime =[FMT DateFromString:order.start_time]; NSDate*now =[NSDate Date]; Nsdatecomponents*cmps =[Orderstarttime Componentstodate:now]; //72 hours of departure time can be deleted, payment can be deleted if(Cmps.month >=1|| Cmps.day >=3|| Cmps.hour >= the) {ktoastwithstring (@"has exceeded the departure time 72 hours, can not pay again")
7, 8 on the cell on a button, when the button is clicked, to get this cell, you can use the agent, you can also use Superview