Loaded the nib file but the view outlet was not set

后端 未结 2 791
半阙折子戏
半阙折子戏 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
    0 讨论(0)
  • 2021-02-06 16:19

    In the Interface Builder you should connect the View to the File's Owner.

    0 讨论(0)
提交回复
热议问题