我知道是否有一个名为 Default.png 的文件,它会自动显示图像。但是,我想在它显示期间更改图像。仅供参考,我有 2 张图片 Default.png 和 default2.png。我想在显示 Default.png 之后显示 default2.png。我尝试了遵循的代码,但没有奏效。我需要做什么?
-(BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
//..................................................................
//self.window bullabulla~
[self performSelectorOnMainThread:@selector(showIntro2View) withObject:nil waitUntilDone:YES];
//[self showIntro2View]; //also tried this, but not work.
[self.window addsubview:tabbarController];
[self.window makeKeyAndVisible];
}
-(void) showIntro2View {
UIImageView *intro2 = [[UIImageView alloc]initwithframe:cgrectmake(0,0,320,460)];
intro2.image = [UIImage imagenamed:@"default2.png"];
[self.window addSubview:intro2];
[self.window bringSubviewToFront:intro2];
[NSThread sleepfortimeinterval:2];
}