ITeye博客

UIImageView 从左到右出现的动画效果

helmsman_xcode · 2011-08-11 11:47 · ios-综合基础文章 · 移动开发 · Markdown

UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 460)];
    [imgView setImage:[UIImage imageNamed:@"pagethr.png"]];
    self.imageViews = imgView;
    [self.view addSubview:imageViews];
    [imgView release];
    
    CGContextRef  context = UIGraphicsGetCurrentContext();
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationCurve:UIViewAnimationCurveLinear];
    [UIView setAnimationDuration:0.75];
    
    [imageViews setFrame:CGRectMake(0, 0, 320, 460)];
    [UIView commitAnimations];

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。