Skip to content

Instantly share code, notes, and snippets.

@warriorg
Created September 6, 2013 03:10
Show Gist options
  • Save warriorg/6459049 to your computer and use it in GitHub Desktop.
Save warriorg/6459049 to your computer and use it in GitHub Desktop.
/*=======================================================
更新图片显示
========================================================*/
-(void)ChangeImage{
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5]; //动画长度,单位为秒
[self.view setAlpha:1];
[myimageview setAlpha:1];
[myimageview setImage:[imgArray objectAtIndex:Page]];
//[myimageview setAnimationRepeatCount:4]; //设置重复次数
[UIView commitAnimations];
self.navigationItem.title = [NSString stringWithFormat:@"%d/%d",Page+1,[imgArray count]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment