[ swift ] swift使用webview 卻出現 unexpectedly found nil while unwrapping an Optional value 錯誤

解決方法很簡單

只要在webview.loadRequest(request) 或其他地方出現時
加上? 即可

即 webview?.loadRequest(request)

沒有留言:

張貼留言