Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access UIImage class without importing UIKit.h in Xcode 6?

#import <Foundation/Foundation.h>

@interface FaceObject : NSObject

@property (strong, nonatomic) UIImage *image;

@end

Xcode gives an error saying "unknown type name 'UIImage' unless I import UIKit.h, but in Xcode 5 i would have not gotten this error and did not need to import UIKit -- is there any explanation for this? Am I doing something wrong? Thanks!

like image 401
luna_ Avatar asked Dec 25 '22 03:12

luna_


1 Answers

In 2015 -- still getting this error. I always forget to include

#import <UIKit/UIKit.h> 

That should take care of it.

like image 187
Ronaldoh1 Avatar answered Dec 28 '22 09:12

Ronaldoh1