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 trialthomas krueger
3,465 PointsPhoto Bombers - Parse Issue UIImage
PhotoController.h
@interface PhotoController : NSObject
- (void)imageForPhoto:(NSDictionary *)photo size:(NSString *)size completion:(void(^)(UIImage *image))completion;
@end
Generates error - Parse Issue Unknown type name 'UIImage'
which then triggers alert in implementation file - semantic issue, conflicting parameter types in implementation of imageForPhoto:size:completion:':'void(^strong)(int *)' vs 'void(^strong)(UIImage *__strong)'
3 Answers
thomas krueger
3,465 PointsOK - project did not have a PrefixHeader.pch, so UIKit was not automatically imported into Photocontroller, leading to UIImage not being recognized.
Trevor Duersch
9,964 PointsI get an error that says "Unknown type name 'UIImage'".
I'm using XCode 6.3.2
I tried importing the UIKit library and I'm still getting the error in the header file.
Alberto Huerdo
2,650 Points@Trevor, just add
#import <UIKit/UIKit.h>
below
#import <Foundation/Foundation.h>
Trevor Duersch
9,964 PointsThanks Alberto! That worked like a charm and I was able to finish the app! :)