Quick drop-down refresh animation

Source: Internet
Author: User

-(void) setuptableview{//Add a drop-down animated picture//Setting the drop-down refresh callback[Self.tableview addgifheaderwithrefreshingtarget:self refreshingaction: @selector (loadnewdata)]; //set up an animated picture of a normal stateNsmutablearray *idleimages =[Nsmutablearray array];  for(Nsuinteger i =1; i<= -; ++i) {//UIImage *image = [UIImage imagenamed:[nsstring stringwithformat:@ "Dropdown_anim__000%zd", I]]; //[Idleimages addobject:image];UIImage *image = [UIImage imagenamed:@"icon_listheader_animation_1"];    [Idleimages Addobject:image];        } [Self.tableView.gifHeader setimages:idleimages forstate:mjrefreshheaderstateidle]; //set up an animated picture of the state that is about to refreshNsmutablearray *refreshingimages =[Nsmutablearray array]; UIImage*image1 = [UIImage imagenamed:@"icon_listheader_animation_1"];    [Refreshingimages Addobject:image1]; UIImage*image2 = [UIImage imagenamed:@"icon_listheader_animation_2"];    [Refreshingimages Addobject:image2];        [Self.tableView.gifHeader setimages:refreshingimages forstate:mjrefreshheaderstatepulling]; //set the animated picture that is being refreshed[Self.tableView.gifHeader setimages:refreshingimages forstate:mjrefreshheaderstaterefreshing]; //go to refresh status now[Self.tableView.gifHeader beginrefreshing];}

Quick drop-down refresh animation

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.