我有一个webapp,用户可以从Safari添加到iPhone主屏幕,以及相同的本机应用程序。
我想使用URLScheme打开全屏Webapp。我试过但是safari打开而不是webapp。
答案 0 :(得分:0)
试试这个 -
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = NSURL (string: " **ENTER YOUR WEB APP URL HERE** ");
let request = NSURLRequest(URL: url!);
webView.loadRequest(request);
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}