Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Photo Browser iPhone App Collection Views Implementing a Custom UICollectionViewCell


I cant get Why is it showing wrror

#import "SuperCoolViewController.h"

@implementation SuperCoolViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    /* Write your code below this line */
   (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath{
[dequeueReuseableCellWithReuseIdentifier:@"Photo" forIndexPath:indexPath];         


2 Answers

Aryan, the challenge no longer exists, but I still think I might be able to help. The default line should not be in the viewDidLoad method, as it is a table view source method. I don't know how this ended up in there, but that is definitely what is causing the issue in this case. The easy fix would be taking the method out of the scope of the viewDidLoad function and setting it up individually as it's own method.

If you have any questions, feel free to ask.

i meant error