iOS开发一些方法
2022-08-10 本文已影响0人
小y想吃糖
1、制造一个崩溃(例如用户不想更新时候)
1)abort();
2)exit(0);
2、优雅的回到主界面(返回app后还是原来界面)
oc)
[[UIApplication sharedApplication] performSelector:@selector(suspend)];
swift)
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))