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
Dawid Cedrych
15,108 PointsI guess my blog reader is not working properly.
I wonder if anyone who run the application on a device encountered such issue. Scrolling is not smooth, it behaves in a very unpleasant way for a user. here is a video i made to show you how it the issue look like: https://www.youtube.com/watch?v=VmJq_Cw6PYo&feature=youtu.be
10 Answers
agreatdaytocode
24,757 PointsI found it. On the TableViewController.M Line 92
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
BlogPost *blogPost = [self.blogPosts objectAtIndex:indexPath.row];
if ([blogPost.thumbnail isKindOfClass:[NSString class]]) {
NSData *imageData = [NSData dataWithContentsOfURL:blogPost.thumbnailURL];
UIImage *image =[UIImage imageWithData:imageData];
cell.imageView.image = image;
} else { // HERE LINE 92
cell.imageView.image = [UIImage imageNamed:@"badges7.png"];
}
cell.textLabel.text = blogPost.title;
cell.detailTextLabel.text = [NSString stringWithFormat:@"%@ - %@",blogPost.author,[blogPost formattedDate]];
return cell;
}
//Be sure to finish the If and else statement Its line 92 in your code.
agreatdaytocode
24,757 PointsHi Dawid, can you share some of the code with us?
Dawid Cedrych
15,108 Pointsany specific class or upload screens of whole code?
agreatdaytocode
24,757 PointsCan you put it on Github or dropbox? That way we can see all the code and figure out what is causing the slow scrolling. Are you using JSON or XML?
Dawid Cedrych
15,108 PointsYes I did it in excactly same way as it was shown on videos. So, i use JSON https://www.dropbox.com/sh/onk46gztwf8wpqn/AABZyTm2gRevEKZbRdY04Rh7a
agreatdaytocode
24,757 PointsI'll Take a look now.
Dawid Cedrych
15,108 PointsThank you so much! However, I cannot test if it works right now because now Xcode doesn't see my iphone connected...
agreatdaytocode
24,757 PointsRelaunch Xcode and re-connect your phone.
Dawid Cedrych
15,108 PointsOK i got it on my phone, now it has the missing treehouse icon near the post, but scrolling is still slow and not smooth… moreover, I downloaded project from the course and it looks really bad, why is it so? http://imgur.com/mkjp5M6 Meanwhile, could you quickly take a look here? https://teamtreehouse.com/forum/something-is-wrong-with-loginviewcontroller
agreatdaytocode
24,757 PointsWhat size iPhone do you have? Also, it looks like you download the unfinished project. Try downloading the last one.
Dawid Cedrych
15,108 PointsOk, nevermind. Aaron, when you had fixed the incomplete if statement, evething worked fine on your simulator/device? Did you notice progression of scrolling? Could you upload modified project on dropbox, so I can download it and check if it works on my device?
agreatdaytocode
24,757 PointsI tested the app via the simulator. I'll post it on github for you to download.
Dawid Cedrych
15,108 PointsScrolling now is a bit smoother but again I notice moments when it lags, in your simulator everything works perfectly fine? thank you
agreatdaytocode
24,757 PointsIt does, When I get home later I'll upload it onto the my phone and see If I have any issues.
Dawid Cedrych
15,108 Pointsthank you, looking forward for the result of your experiment:)
Dawid Cedrych
15,108 Pointsthank you, looking forward for the result of your experiment:)
agreatdaytocode
24,757 PointsYeah its a bit choppy on the phone. very odd.
Dawid Cedrych
15,108 PointsThat's a relief that I'm not alone :) Did you finish this project on your own before? Did you encounter such issues?
agreatdaytocode
24,757 PointsI have.. Its on my Github profile and it works fine for me. Check it out here: