在iPhone中,可以直接用UIApp打开URL地址。如下所示:

  1. [ UIApp openURL: [ NSURL URLWithString:@"http://www.apple.com" ] ];

或者:

  1. [ UIApp openURL: [ NSURL URLWithString:@"mailto:apple@mac.com?Subject=hello" ] ];

与此同时,iPhone还包含一些其他除了http://或者mailto:之外的URL:

sms:// 可以调用短信程序

tel:// 可以拨打电话

itms:// 可以打开MobileStore.app

audio-player-event:// 可以打开iPod

audio-player-event://?uicmd=show-purchased-playlist 可以打开iPod播放列表

video-player-event:// 可以打开iPod中的视频

以上是optimo发现的。

如果你还发现了其他特殊URL,欢迎在评论中提出。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-05-30
  • 2022-03-02
猜你喜欢
  • 2022-03-06
  • 2022-02-15
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
  • 2021-06-12
相关资源
相似解决方案