首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

图片由小到大缓慢展示的效果

2012-07-01 
图片由小到大缓慢显示的效果UIImageView *imageView [[UIImageView alloc] initWithFrame:CGRectMake(0,

图片由小到大缓慢显示的效果

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];[imageView setImage:[UIImage imageNamed:@"star.png"]];self.myImageView = imageView;[self.view addSubview:imageView];[imageView release];CGContextRef context = UIGraphicsGetCurrentContext();[UIView beginAnimations:nil context:context];[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];[UIView setAnimationDuration:2.5];CGImageRef img = [self.myImageView.image CGImage];[myImageView setFrame:CGRectMake(0, 0, CGImageGetWidth(img), CGImageGetHeight(img))];    [UIView commitAnimations];

?

热点排行