如何设置在应用程序启动的动画在iPhone?

我如何可以设置应用程序委托类动画?

--------------解决方案-------------

是的,你可以展示你的应用程序中加载刚结束的动画。

如果你想你的动画“为Default.png”淡出例如,当你的应用程序中加载,试试这个:

AppNameAppDelegate.h:

#import UIKit/UIKit.h

@interface AppNameAppDelegate : NSObject {
UIImageView *splashView;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;

- (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context;

@end

AppNameAppDelegate.m:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self.window makeKeyAndVisible];

splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)];
splashView.image = [UIImage imageNamed:@"Default.png"];
[_window addSubview:splashView];
[_window bringSubviewToFront:splashView];
//Set your animation below
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:_window cache:YES];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector (startupAnimationDone:finished:context:)];
splashView.frame = CGRectMake(-60, -60, 440, 600);
splashView.alpha = 0.0;
[UIView commitAnimations];

return YES;
}

- (void)startupAnimationDone:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
[splashView removeFromSuperview];
[splashView release];
}

我不知道这是否是你在寻找,但也许......

嗯...我想你将不得不更清楚一点。 你是不是可以设置动画,你的应用程序的绝对第一点。 您可以添加一个名为“为Default.png”,您加载应用程序时将显示的图像。

应该有与展示的AppDelegate在你的动画没有什么大问题,但它只会笑后,您的应用程序加载。

分类:iphone 时间:2012-04-23 人气:0
分享到:

相关文章

Copyright (C) 55228885.com, All Rights Reserved.

55228885 版权所有 京ICP备15002868号

processed in 1.175 (s). 10 q(s)