美文网首页
iOS APP主动关闭APP

iOS APP主动关闭APP

作者: noname004 | 来源:发表于2021-12-10 15:19 被阅读0次

swift:

let control = UIControl()

control.sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)

objective-c: 

UIControl *control = [UIControl new];

[control sendAction:@selector(suspend) to:[UIApplication sharedApplication] forEvent:nil];

相关文章

网友评论

      本文标题:iOS APP主动关闭APP

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