Jump to UICollectionViewController and report cocould not load NIB in bundle solution. uicollectionview

Source: Internet
Author: User

Jump to UICollectionViewController and report cocould not load NIB in bundle solution. uicollectionview

The error code is as follows: 'Could not load NIB in bundle: 'nsundle </Users/mac/Library/Developer/CoreSimulator/Devices/A0182119-C6AC-4732-BF37-3E6D35B102E1/data/Containers/Bundle/Application/E5F586ED-526F-4D52-9C7C-9335E772F666/00-ItcastLottery.app> (loaded) 'with name 'product''

The custom cell of collectionViewController in the project is created by xib. However, this error is reported every time you run it, so that the xib file named "product" cannot be loaded. None of the methods found on the Internet can be used. The reason is not found until the second night of troubleshooting, but it is easy to ignore. If you do not know, you may fall behind here in the future.

Static NSString * const reuseIdentifier = @ "product"; this line is used to set the identifier code in the UICollectionViewController. m file. The problem lies in the "product" string. The identifier string must be the same as the name of the custom cell file loaded by the UICollectionViewController.

This note is not mentioned in the MJ course video. The self-taught children's shoes should be solved according to the above methods.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.