美文网首页
iOS 退出程序

iOS 退出程序

作者: 赵永洪 | 来源:发表于2015-12-15 20:08 被阅读80次

尹一下app的头文件

AppDelegate * app = (AppDelegate *)[UIApplication sharedApplication].delegate;

UIWindow *window = app.window;

[UIView animateWithDuration:0.5 animations:^{

window.alpha = 0.0;

window.frame = CGRectMake(0, window.bounds.size.width, 0, 0);

} completion:^(BOOL finished) {

exit(0);

}];

相关文章

网友评论

      本文标题:iOS 退出程序

      本文链接:https://www.haomeiwen.com/subject/bpiuhttx.html