ios - Perform the segue from table view to the web view error -
i run error when try perform segue table view web view (for youtube videos). attached code both views, error , target output console. seems problem wkwebview class... don't error related that.
sender:
func tableview(_ tableview: uitableview, didselectrowat indexpath: indexpath) { let partyrock = partyrocks[indexpath.row] performsegue(withidentifier: "videovc", sender: partyrock) } override func prepare(for segue: uistoryboardsegue, sender: any?) { if let destination = segue.destination as? videovc { if let party = sender as? partyrock { destination.partyrock = party } } }
destination:
import uikit class videovc: uiviewcontroller { @iboutlet weak var webview: uiwebview! @iboutlet weak var titlelbl: uilabel! private var _partyrock: partyrock! var partyrock: partyrock { { return _partyrock } set { _partyrock = newvalue } } override func viewdidload() { super.viewdidload() titlelbl.text = partyrock.videotitle webview.loadhtmlstring(partyrock.videourl, baseurl: nil) } }
the console output:
2017-08-18 13:33:10.460227+0300 tableviews-youtubevideo[49329:7366415] [boringssl] function boringssl_context_get_peer_sct_list: line 1739 received sct extension length less sct data length 2017-08-18 13:33:16.756971+0300 tableviews-youtubevideo[49329:7366015] *** terminating app due uncaught exception 'nsinvalidunarchiveoperationexception', reason: 'could not instantiate class named wkwebview' *** first throw call stack: ( 0 corefoundation 0x000000010fbc626b __exceptionpreprocess + 171 1 libobjc.a.dylib 0x000000010c324f41 objc_exception_throw + 48 2 corefoundation 0x000000010fc3aba5 +[nsexception raise:format:] + 197 3 uikit 0x000000010cfae7cc uinibdecoderdecodeobjectforvalue + 323 4 uikit 0x000000010cfaeae7 uinibdecoderdecodeobjectforvalue + 1118 5 uikit 0x000000010cfae67e -[uinibdecoder decodeobjectforkey:] + 89 6 uikit 0x000000010c99041f -[uiview initwithcoder:] + 969 7 uikit 0x000000010cfae949 uinibdecoderdecodeobjectforvalue + 704 8 uikit 0x000000010cfae67e -[uinibdecoder decodeobjectforkey:] + 89 9 uikit 0x000000010cd631fb -[uiruntimeconnection initwithcoder:] + 178 10 uikit 0x000000010cfae949 uinibdecoderdecodeobjectforvalue + 704 11 uikit 0x000000010cfaeae7 uinibdecoderdecodeobjectforvalue + 1118 12 uikit 0x000000010cfae67e -[uinibdecoder decodeobjectforkey:] + 89 13 uikit 0x000000010cd623f8 -[uinib instantiatewithowner:options:] + 1262 14 uikit 0x000000010ca8dd49 -[uiviewcontroller _loadviewfromnibnamed:bundle:] + 383 15 uikit 0x000000010ca8e652 -[uiviewcontroller loadview] + 177 16 uikit 0x000000010ca8e983 -[uiviewcontroller loadviewifrequired] + 195 17 uikit 0x000000010ca8f1e0 -[uiviewcontroller view] + 27 18 uikit 0x000000010d4e639d -[_uifullscreenpresentationcontroller _setpresentedviewcontroller:] + 89 19 uikit 0x000000010ca5fa8f -[uipresentationcontroller initwithpresentedviewcontroller:presentingviewcontroller:] + 133 20 uikit 0x000000010caa2338 -[uiviewcontroller _presentviewcontroller:withanimationcontroller:completion:] + 3808 21 uikit 0x000000010caa514a __62-[uiviewcontroller presentviewcontroller:animated:completion:]_block_invoke + 134 22 uikit 0x000000010caa55ea -[uiviewcontroller _performcoordinatedpresentordismiss:animated:] + 532 23 uikit 0x000000010caa5086 -[uiviewcontroller presentviewcontroller:animated:completion:] + 181 24 uikit 0x000000010caaa487 -[uiviewcontroller _showviewcontroller:withaction:sender:] + 274 25 uikit 0x000000010d0349a4 __66-[uistoryboardshowseguetemplate newdefaultperformhandlerforsegue:]_block_invoke + 134 26 uikit 0x000000010d1e8dcb -[uistoryboardseguetemplate _performwithdestinationviewcontroller:sender:] + 279 27 uikit 0x000000010d1e8c83 -[uistoryboardseguetemplate _perform:] + 82 28 uikit 0x000000010ca91bc4 -[uiviewcontroller performseguewithidentifier:sender:] + 99 29 tableviews-youtubevideo 0x000000010ba025c1 _t023tableviews_youtubevideo6mainvcc9tableviewyso07uitableh0c_10foundation9indexpathv14didselectrowattf + 273 30 tableviews-youtubevideo 0x000000010ba0266c _t023tableviews_youtubevideo6mainvcc9tableviewyso07uitableh0c_10foundation9indexpathv14didselectrowattfto + 92 31 uikit 0x000000010ca2d603 -[uitableview _selectrowatindexpath:animated:scrollposition:notifydelegate:] + 1810 32 uikit 0x000000010ca2d81e -[uitableview _userselectrowatpendingselectionindexpath:] + 344 33 uikit 0x000000010c900739 _runaftercacommitdeferredblocks + 318 34 uikit 0x000000010c8eef81 _cleanupaftercaflushandrundeferredblocks + 280 35 uikit 0x000000010c91f0d8 _aftercacommithandler + 137 36 corefoundation 0x000000010fb68e57 __cfrunloop_is_calling_out_to_an_observer_callback_function__ + 23 37 corefoundation 0x000000010fb68dae __cfrunloopdoobservers + 430 38 corefoundation 0x000000010fb4d3c4 __cfrunlooprun + 1572 39 corefoundation 0x000000010fb4cb29 cfrunlooprunspecific + 409 40 graphicsservices 0x00000001122589c6 gseventrunmodal + 62 41 uikit 0x000000010c8f49a4 uiapplicationmain + 159 42 tableviews-youtubevideo 0x000000010ba06757 main + 55 43 libdyld.dylib 0x0000000110ce8621 start + 1 44 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating uncaught exception of type nsexception (lldb)
Comments
Post a Comment