2010-07-06 139 views
1

我们可以使用gif图像作为背景吗? 我想设置一个gif图像作为背景,就像一些飞翔的鸟儿一样......gif图像作为背景

我们可以用gif图像来设置背景吗?

如果是,比如何?

感谢和问候

+0

这看起来不像一个编程问题。 – 2010-07-06 04:48:25

+0

@marcelo 所以,笏你以为是。 c我的回答...... – iscavengers 2010-07-06 05:01:24

+0

看起来有人想把一些壁纸加载到他们的iPhone上。另一个答案假设完全不同的情况,并且得到了投票(不是我)的事实表明,混淆不是我一个人。 – 2010-07-06 05:11:09

回答

0

在这里,我得到了解决方案。

UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; 
    animatedImageView.animationImages = [NSArray arrayWithObjects:  
             [UIImage imageNamed:@"default1.jpg"], 
             [UIImage imageNamed:@"default2.jpg"], 
             [UIImage imageNamed:@"default3.jpg"], 
             [UIImage imageNamed:@"default4.jpg"], 
             [UIImage imageNamed:@"default5.jpg"], 
             [UIImage imageNamed:@"default6.jpg"], 
             [UIImage imageNamed:@"default7.jpg"], 
             [UIImage imageNamed:@"default8.jpg"], 
             [UIImage imageNamed:@"default9.jpg"], 
             [UIImage imageNamed:@"default10.jpg"],          
             [UIImage imageNamed:@"default11.jpg"], 
             [UIImage imageNamed:@"default12.jpg"], 
             [UIImage imageNamed:@"default13.jpg"], 
             [UIImage imageNamed:@"default14.jpg"],          
             [UIImage imageNamed:@"default15.jpg"], nil]; 
    animatedImageView.animationDuration = 3.0f; 
    animatedImageView.animationRepeatCount = 0; 
    [animatedImageView startAnimating]; 
    [self.view addSubview: animatedImageView]; 
1

是的你可以 - 我假设你想要一个动画GIF?

它和静态背景是一样的CSS规则。

body { 
    background: url(animated.gif); 
}