看板 MacDev 關於我們 聯絡資訊
午安 想請教個問題我想從網路讀取圖片 然後透過UIImage設定到UIImageView去 之前用的code都好好的 NSURL *url = [NSURL URLWithString:imgUrlString]; UIImage *urlImage = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:url]]; 可在urlImage都只拿到Nil 在8.x版還可以,最近升級到9.x卻出現這問題 請問有解決辦法嗎 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.121.219.197 ※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1467097821.A.597.html
darktt: 你這樣子不覺得載入的過程中卡卡的嗎? 06/28 15:22
darktt: 至少也先用NSURLSession將檔案載回來再說啊 06/28 15:23
rayshiuan: 應該是被 Transport Security 擋住了 06/28 15:26
areyo: 卡,倒是不會,Transport Security是ios新增的嗎?還是 06/28 15:34
areyo: 真的ㄝ是Transport Security的問題 06/28 15:41
xpop777: iOS 9 開始的,甚至明年要全面改成 https 才能上架 06/28 20:40
areyo: !!!!!唉 06/30 10:27
smallchocho: 小弟我是新手,但我有遇過這個問題,只有Https開頭的 11/24 08:04
smallchocho: 網址才能不做任何設定,Http網址就要打開樓樓上說的 11/24 08:04
smallchocho: 權限了 11/24 08:04