I've upgraded XCode from 5.1.1 to XCode 6.0.1 recently. Now everytime I want to define a new UIImage object I get this error:
Unknown type name 'UIImage'
Code:
1. Create a new project
2. Add Image View
control to the storyboard
3. Reference the Image View
by adding IBOutlet
4. Add new class file
5. Add the following line of code to the header file of the new class:
@property (strong, nonatomic) UIImage *background;
Header file (.h) content:
#import <Foundation/Foundation.h> @interface CCTile : NSObject @property (strong, nonatomic) NSString *story; @property (strong, nonatomic) UIImage *background; // Error: Unknown type name 'UIImage' @end
However, if I add #import <UIKit/UIKit.h>
to the header file (above) everything seems OK!
Any ideas what am I missing here, please? Is this a change in XCode header files!