我想在iphone启动的默认启动视图后加载我选择的视图。有人知道如何实现这一目标吗?我是xcode和ios开发的新手。
答案 0 :(得分:0)
Github上有一个名为LaunchImageTransition的项目,它应该在加载Default.png
图像后提供自定义视图。
答案 1 :(得分:0)
在[self setUpSplash];
方法中添加- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
方法。并在 AppDelegate.m
-(void) setUpSplash {
self.splashImgView = [[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
[self.splashImgView setImage: [UIImage imageNamed:@"splash.png"]];
[self.window addSubview: self.splashImgView];
[NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(closeSplashWithTimer:) userInfo:nil repeats:NO];
}
- (void)closeSplashWithTimer:(NSTimer *)theTimer
{
[UIView beginAnimations:@"ToggleViews" context:nil];
[UIView setAnimationDuration:1.0];
// Make the animatable changes.
splashImgView.alpha = 0.0;
self.mvNavigationController.view.alpha = 1.0;
// Commit the changes and perform the animation.
[UIView commitAnimations];
[NSTimer scheduledTimerWithTimeInterval:2.0f target:self selector:@selector(closeSplashWithTimerAgain:) userInfo:nil repeats:NO];
}
- (void)closeSplashWithTimerAgain:(NSTimer *)theTimer
{
[self.splashImgView removeFromSuperview];
}
答案 2 :(得分:0)
请检查这个项目 https://github.com/QuickBlox/ChattAR-ios
默认情况下,飞溅消失后,使用自定义启动画面。