我想在UIView上透露一张图片:
有什么想法吗?
答案 0 :(得分:0)
这样的事情:
UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"someImage.png"]];
CGRect endFrame = img.frame;
CGRect startFrame = img.frame;
startFrame.size.height = 0;
img.frame = startFrame;
[view addSubview:img];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration: 0.5];
img.frame = endFrame;
[UIView commitAnimations];