ios 跳到appstore 更新或評分

OC代碼:

    NSURL *url = [NSURL URLWithString:@"https://itunes.apple.com/us/app/id****"];
    if ([[UIApplication sharedApplication] canOpenURL:url]) {
        [[UIApplication sharedApplication] openURL:url];

    }


swift代碼:

        let url = "https://itunes.apple.com/us/app/id****"
        if UIApplication.shared.canOpenURL(URL.init(string: url)) {
            UIApplication.shared.openURL(URL.init(string: url)!)

        }


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章