-(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