简体   繁体   中英

Collection View in Objective C — unknown error

I am following this tutorial. It has me using Nibs/Xibs(?) as opposed to storyboards or a programmatic approach. I have followed the tutorial up until the first build but instead of properly compiling I get a message in the console and instead of a proper collection view with 200x200 cells I get one button that crashing the app if clicked.

Unknown class _TtC4test3box in Interface Builder file.

I wonder if it is how I setup my xibs which is causing the problem as I am not very familiar with the graphical elements in xcode like xibs or storyboard.

I'd like to know how to approach this. If more info is needed I can upload the project to github.

One of your objects in the nib has a class with the name _TtC4test3box . Check this text field and if you find one with this value, delete the string.

在此处输入图片说明

As for the button, I'm guessing the selector that is being executed on button tap isn't implemented. Check the action property of the button in IB (or in code), and ensure the method body for it exists. Also check that the target is correct too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM