nsurl

    0热度

    2回答

    我的代码必须更新网页视图和下载网站。但它不会因为URLWithString返回null。我怎么解决这个问题? stringByAddingPercentEscapesUsingEncoding已被弃用。 -(void) setWebViewMain:(NSString *) link { // link = @"http://www.rbc.ru/society/05/09/2017/5

    0热度

    2回答

    我想在URL查询中使用的UITextField值在UIWebView加载网址: let texts = SearchBox.text! let searchurl = "http://sngpoisk.ru/search-location/?search_keywords=\(texts)&search_location=&place_location=&latitude=&longitude=

    -2热度

    1回答

    如何保存照片?在迅速 哪种方式更好? @IBAction func savePhoto(_ sender: Any) { let imageData = UIImagePNGRepresentation(myImg.image!) let compresedImage = UIImage(data: imageData!) UIImageWriteToSaved

    0热度

    1回答

    开始时,我们有它获取对的Mac 10.6 SDK构建的遗留应用程序。我们正在使用的NSURLMutableRequest和NSURLConnection进行网络通话。使用Wireshark,我注意到在10.9 - 10.11.2上所有这些调用都是在TLSv1上进行的。在10.11.6起(也10.13测试版)这些获得由上TLSv1.2工作。 我更改了代码以强制TLSv1.2使用CFURLReques

    1热度

    3回答

    嗨,下面的代码可以从网络服务器上下载图片。该请求是HTTP如此不安全。 DispatchQueue.global(qos: .userInitiated).async { var productImage = Utilities.GetEmptyImageBottle() if (entry.ImageName != nil || entry.ImageUrl != nil

    0热度

    1回答

    我使用NSURL会话来获取特定网站的HTML代码。下面的代码对于iOS(在ViewController.swift中)工作得很好,但在watchOS(在InterfaceController.swift中)总是失败。代码总是打印else语句:print(“apple watch:error with loading nsurlsession”)。 有人可以解释我(为什么它失败了)我怎么能改变这个?

    -1热度

    1回答

    当我将字符串转换为NSURL时,我得到了一些东西。 我的代码编号... NSString *urlString = [[NSString alloc]initWithFormat:@"http://host name/index.php?id=%@&mob=%@&name=%@&mail=%@&m=23", self.deviceId, self.pnumber, self.name, self.

    0热度

    2回答

    我从用户照片库中选取视频,然后将视频保存在用户Documents文件夹中,以便即使用户从他的照片库中删除此视频也能播放视频。该文件的URL存储在核心数据中。 一切正常,直到下次运行应用程序。不知何故,它似​​乎不再有效,这是奇怪的,因为我可以在[AVPlayer playerWithURL:videoURL]失败时删除视频文件。 这里是我挑的视频网址: - (void) imagePickerCo

    1热度

    3回答

    我有URL在AppDelegate方法。 func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { } 网址看起来www.wesite.com/shareplace.html?placeid=123 我的问题是如何将

    0热度

    3回答

    我有一个macOS应用程序。我需要删除任何NSURL的方案和www部分。这是我想出了: // For testing purposes. NSString *blogID = @"https://www.testing1234.tumblr.com"; // Create the corrected link string. NSString *correctLink; // Conv