开发者

Simulate a 'Home Button' click

开发者 https://www.devze.com 2023-02-06 20:37 出处:网络
After reading that there is no proper way to exit an iPhone app, is there a way to programmatically send a Home button click on the device, that would minimise the app?

After reading that there is no proper way to exit an iPhone app, is there a way to programmatically send a Home button click on the device, that would minimise the app?

"Apple developers don't do this." is an ac开发者_Python百科ceptable answer :)

Thanks


"Apple developers don't do this." :-) At least when aiming for the AppStore.


You can't simulate it. But in the thread you linked to it says you can use exit(0) to quit the app. This won't minimise it though and it's quite likely that your app will be rejected.

0

精彩评论

暂无评论...
验证码 换一张
取 消