Loaded the nib file but the view outlet was not set

后端 未结 2 792
半阙折子戏
半阙折子戏 2021-02-06 15:43

I deleted the universityPicker.xib accidentally and then made a new one with the same name but no connection could be done. The file crashes and gives this message



        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-06 16:08

    • Open the universityPicker.XIB file
      • Click on file's owner icon on the left bar
      • Click on the third tab in the right-hand sidebar
      • Under "Custom Class" at the top, make sure Class is the name of the ViewController that should correspond to this view. If not, enter it
      • In the right-hand sidebar, click on the last tab
      • You should see "outlets" with "view" under it. Drag the circle next to it over to the "view" icon on the left bar
      • Save the xib and re-run

提交回复
热议问题