问题
I saw the Bug Me iPhone app and was intrigued by the ability to add icons to the home screen. I figured it would work similar to the way that Safari achieves it.
There as a similar question here that said it was not possible: Implementing "Add to Home Screen", ala Safari
Clearly there is a way and I am not looking in the right places.
Has anyone else worked it out yet?
回答1:
You have to use Safari.
BugMe saves the note on home screen by:
- Upload the note to their server.
- Launch Safari by
-openURL:
with a URL to their server. - In Safari, the user is instructed to press the "+" key to add a special
bugme://
link to home screen.
There's no other ways if only documented methods can be used.
For private APIs, create a UIWebClip object and use -[UIApplication addWebClipToHomeScreen:]
.
来源:https://stackoverflow.com/questions/2637391/add-icon-to-home-screen-like-safari