【问题标题】:animate imageview like flying on the sky effect in iPhone动画图像视图,如 iPhone 中的天空飞行效果
【发布时间】:2011-09-19 13:53:35
【问题描述】:

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

请分享任何想法。

谢谢,

艾哈迈德

【问题讨论】:

    标签: iphone animation uiview uiimageview


    【解决方案1】:

    这是我的火箭

    -(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)];
    
        }];
    
    }
    

    【讨论】:

    • 老大,我试过给你,但它说我没有资格给你,因为我是新来的堆栈溢出,需要15个声望。对吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-17
    • 2013-02-01
    • 2013-04-30
    相关资源
    最近更新 更多