gpt4 book ai didi

iphone - 在 iPhone 中为 imageview 制作动画效果,就像在天空中飞翔一样

转载 作者:行者123 更新时间:2023-12-03 21:18:37 27 4
gpt4 key购买 nike

我有一个 ImageView ,我想以向上的方向为该 ImageView 设置动画,就像它给人一种火箭在天空中飞翔的感觉。

请分享任何想法。

谢谢

艾哈迈德

最佳答案

这是我的火箭

-(void) viewDidAppear:(BOOL)animated{

[super viewDidAppear:animated];

UIImageView *imageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"rocket.png"]];

[imageView setFrame:CGRectMake(200, 480, 100, 100)];

[self.view addSubview:imageView];


[UIView animateWithDuration:7.0 animations:^(void) {

[imageView setFrame:CGRectMake(200, -100, 100, 100)];

}];

}

关于iphone - 在 iPhone 中为 imageview 制作动画效果,就像在天空中飞翔一样,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7472064/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com