Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Crash after ViewDidLoad when loading CollectionView content

Here is the error message I get. After ViewDidLoad for the ViewController class that has the collection view in it. I set breakpoints all over and it seems to happen after ViewDidLoad and does not reach any other methods.

In the StoryBoard I have the collection view assigned to the view of the view controller in question. The delegate and datasource are assigned to this view controller.

- (void)viewDidLoad

{

[superviewDidLoad];

_iconCollection.backgroundColor = [UIColorcolorWithWhite:0.25falpha:0.0f];

_iconNumber = -1;

}

Error Message:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController _layoutAttributes]: unrecognized selector sent to instance 0x8c920b0'

*** First throw call stack:

(

0 CoreFoundation 0x01bb21e4 __exceptionPreprocess + 180

1 libobjc.A.dylib 0x019318e5 objc_exception_throw + 44

2 CoreFoundation 0x01c4f243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275

3 CoreFoundation 0x01ba250b ___forwarding___ + 1019

4 CoreFoundation 0x01ba20ee _CF_forwarding_prep_0 + 14

5 UIKit 0x00c43b35 -[UICollectionView _indexPathForView:ofType:] + 109

6 UIKit 0x00c43cc6 -[UICollectionView indexPathForCell:] + 48

7 LightSpace 0x0002623c -[ViewController prepareForSegue:sender:] + 780

8 UIKit 0x00b55efa -[UIStoryboardSegueTemplate _perform:] + 156

iPad 2, iOS 7.1, Development environment

Posted on Aug 29, 2014 9:37 AM

Reply

There are no replies.

Crash after ViewDidLoad when loading CollectionView content

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.