Can't access the 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 "an unknown name like" UIImage "if I do not import UIKit.h, but in Xcode 5 I would not get this error and would not need to import UIKit - is there any explanation for this? I do what something wrong? Thanks!

+4
source share
2 answers

Xcode 6 does not contain a .pch file by default. In previous versions, this file included importing UIKit (more details here - Why is ProjectName-Prefix.pch automatically created in Xcode 6? ).

+2
source

2015 .

#import <UIKit/UIKit.h> 

.

+8

All Articles