Can't connect IBOutlet in Interface Builder

前端 未结 19 2065
别跟我提以往
别跟我提以往 2020-12-04 20:02

I\'m having a weird experience. I create any type of iPhone application, add a UIViewController with Xib file. I can edit the xib file with controls and see them rendered if

19条回答
  •  爱一瞬间的悲伤
    2020-12-04 20:21

    I'm a total newbie at this, and I had the same problem. I went to try diatrevolo's suggestion, and, in doing so, found out what was causing my problem. I had originally created my ViewController somewhere random in the project hierarchy, and then moved them into the classes folder. This meant that the actual files were not in the classes folder, but the project thought that they were, so IB was looking in the wrong place. I moved the actual files in to the actual classes file with Finder, and then deleted and readded them in the project. Then everything worked!

提交回复
热议问题