給ViewController關(guān)聯(lián)xib
-
【User Interface】中選擇【Empty】,點(diǎn)擊next
image.png -
Save As中填寫ViewController的名字高镐,點(diǎn)擊Create
image.png -
在生成ViewController.xib中創(chuàng)建UIView視圖
image.png -
xib中點(diǎn)擊【File’s Owner】填寫ViewController的名字目养,設(shè)置Class
image.png -
【File’s Owner】右鍵,點(diǎn)擊Outlets中的view屬性财异,和剛創(chuàng)建的UIView視圖做個(gè)關(guān)聯(lián)
image.png