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

Source: Internet
Author: User

/** 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.