報錯'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "BlueView" nib but the view outlet was not set.'
查書才知道,沒有做nib文件到xxxViewControler程序的關(guān)聯(lián),特此記錄下來:
1, 打開nib文件
2, 點(diǎn)擊"File's Owner", 按command+4,設(shè)置Class為xxxViewControler
3, 按Control+"Files's Owner", 里面有個默認(rèn)的IBOutlet變量view, 看一下后面有沒有做關(guān)聯(lián),如果沒有就拉到下面的View和視圖做個關(guān)聯(lián)