Objective c Ios动画启动屏幕

Objective c Ios动画启动屏幕,objective-c,Objective C,我试图让我的启动屏幕显示3个图像后,对方 我尝试了多种方法,但如果有人能看到我在代码中犯了什么错误,我会一直出错吗 @interface CydiaLoadingViewController : UIViewController @end %hook CydiaLoadingViewController -(void)loadView { %orig; UIView *xiView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bou

我试图让我的启动屏幕显示3个图像后,对方

我尝试了多种方法,但如果有人能看到我在代码中犯了什么错误,我会一直出错吗

@interface CydiaLoadingViewController : UIViewController
@end

%hook CydiaLoadingViewController
-(void)loadView {
%orig;
UIView *xiView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds];
xiView.backgroundColor = [UIColor whiteColor];
UIImage *image1 = [UIImage imageNamed:@"image1.png"];
UIImage *image2 = [UIImage imageNamed:@"image2.png"];
UIImage *image3 = [UIImage imageNamed:@"image3.png"];
UIImageView *logo =[[NSArray alloc] initWithObjects:image1,image2,image3, nil];
logo.imageView.animationRepeatCount = 7;
[logo.imageView startAnimating];
logo.frame = CGRectMake([UIScreen mainScreen].bounds.size.width / 2 - 60, [UIScreen mainScreen].bounds.size.height / 2 - 90, 120, 120);
logo.layer.masksToBounds = YES;
logo.layer.cornerRadius = 10;
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height / 2 + 60, [UIScreen mainScreen].bounds.size.width, 40)];
label.text = @"Cydia";
label.textAlignment = NSTextAlignmentCenter;
[label setFont:[UIFont boldSystemFontOfSize:30]];\
[xiView addSubview:logo];
[xiView addSubview:label];
[[self view] addSubview:xiView];
}

-(BOOL)hidesNavigationBar {
    return YES;
}
%end
错误

Tweak.xm:92:14: error: cannot initialize a variable of type 'UIImageView *' with an
      rvalue of type 'NSArray *'
UIImageView *logo =[[NSArray alloc] initWithObjects:image1,image2,image3, nil];

错误是因为您在此行将
NSArray
的实例分配给了
UIImageView
变量

UIImageView *logo =[[NSArray alloc] initWithObjects:image1,image2,image3, nil];
据我所知,您希望使用
UIImageView
逐一呈现这3幅图像。在这种情况下,您应该正常创建
UIImageView
并使用

比如说

UIImageView *logo = [[UIImageView alloc] init];
logo.animationImages = [[NSArray alloc] initWithObjects:image1,image2,image3, nil];

您的错误是什么?添加了错误