User clicks the button, and an icon is开发者_如何学JAVA added to the iPhone desktop. If possible, can I activate this button manually?
There is no way for you to do this, because otherwise every developer would do this by invoking it with an automated script and then everyone would just be annoyed. You will have to direct users to press the +
sign and then Add to Home Screen
.
I believe this is not possible. However a common approach is to detect whether running in an iPhone browser (not as an HTML app) and show a huge arrow pointing at the +
sign.
You can take a look at this tool, which is a nice JavaScript snippet giving the user a hint on how to add your homepage as a Icon on your homescreen:
http://cubiq.org/add-to-home-screen
For a live demo visit this page with your iOS-device:
http://cubiq.org/dropbox/a2h/examples/simple/
精彩评论