iOS之exit(0)动画退出应用程序
2012-12-05 22:18
393 查看
-(void)animationFinished:(NSString*)animationid finished:(NSNumber*)finished
context:(void*)context
{
if ([animationid
compare:@"exitApplication"]==0) {
exit(0);// 退出应用程序
NSLog(@"stop");
}
}
-(IBAction)exit:(id)sender
{
[UIViewbeginAnimations:@"exitApplication"context:nil];
//动画名称
[UIViewsetAnimationDuration:6];
[UIViewsetAnimationDelegate:self];
[UIViewsetAnimationTransition:UIViewAnimationCurveEaseInOutforView:self.viewcache:NO];
// 动画方式
//动画结束执行的操作
[UIVie setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
self.view.bounds=CGRectMake(0,0,
0, 0);//动画结束
[UIViewcommitAnimations];
}
context:(void*)context
{
if ([animationid
compare:@"exitApplication"]==0) {
exit(0);// 退出应用程序
NSLog(@"stop");
}
}
-(IBAction)exit:(id)sender
{
[UIViewbeginAnimations:@"exitApplication"context:nil];
//动画名称
[UIViewsetAnimationDuration:6];
[UIViewsetAnimationDelegate:self];
[UIViewsetAnimationTransition:UIViewAnimationCurveEaseInOutforView:self.viewcache:NO];
// 动画方式
//动画结束执行的操作
[UIVie setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
self.view.bounds=CGRectMake(0,0,
0, 0);//动画结束
[UIViewcommitAnimations];
}
相关文章推荐
- iOS开发-使用代码退出应用程序,带动画。
- iOS开发-使用代码退出应用程序,带动画。
- Android Animation学习 实现 IOS 滤镜退出动画
- IOS开发之Iphone和Ipad应用程序图标和启动动画
- Ojective C 中编写的ios程序,强制用户在按下home键的时候,退出应用程序
- IOS开发之Iphone和Ipad应用程序图标和启动动画
- iOS关闭App带动画退出
- android为应用程序添加退出动画
- android为应用程序添加退出动画
- iOS关闭App带动画退出
- Windows System Error Codes (exit codes) 操作系统应用程序退出代码
- Application.Exit()退出应用程序但在资源管理器中还能看到
- iOS-->关闭键盘和代码退出应用程序的方法
- Android Animation学习 实现 IOS 滤镜退出动画
- IOS开发之Iphone和Ipad应用程序图标和启动动画
- IOS开发之Iphone和Ipad应用程序图标和启动动画
- iOS exit(0); 直接退出程序
- android 完全退出应用程序 使用ExitApplication.
- 主动退出iOS应用程序的一种方法
- 主动退出iOS应用程序的一种方法