我试图创建一个具有某些图像约束的动画UIImageView。将UIImageView添加为子视图
我希望UIImageView的动画大小为141x262,而不是整个屏幕。目前我有这个代码:
CJ = [[UIImageView alloc] initWithFrame:self.view.frame];
CJ.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"CJ_1.png"],
[UIImage imageNamed:@"CJ_2.png"],
[UIImage imageNamed:@"CJ_3.png"], nil];
CJ.animationDuration = 1;
CJ.animationRepeatCount = 0;
[CJ startAnimating];
[self.view addSubview:CJ];
任何和所有的帮助将不胜感激!
您是否还在使用界面构建器? – sridvijay 2012-07-12 16:20:52
是的,我正在使用界面生成器。 – user1521367 2012-07-12 16:29:14