剛從oc轉(zhuǎn)swift一個(gè)周,基礎(chǔ)還沒(méi)打牢
我跟隨朝輝大大的腳步用他寫(xiě)的30個(gè)swift小項(xiàng)目進(jìn)行練習(xí)
寫(xiě)到第三個(gè)Project 3 - Play Local Video的時(shí)候遇到了一些小問(wèn)題
其中tableView和Cell是在storyboard上面拖進(jìn)去的,同時(shí)創(chuàng)建了一個(gè)名為VideoCell的自定義手寫(xiě)cell
在把delegate,dataSource寫(xiě)好后

運(yùn)行一直crash,給出的提示是“unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard”
到最后才找到原來(lái)storyboard里cell對(duì)應(yīng)的identifier一欄,需要填上你在代碼里寫(xiě)的對(duì)應(yīng)identifier

可能這個(gè)時(shí)候你運(yùn)行還是會(huì)crash,不用擔(dān)心只要clean一下再運(yùn)行就好了。