RomanHouse
RomanHouse

Reputation: 2552

UIColor expected a type after update to xCode 7.3

My project stop to compile after was updated to 7.3 version. For this moment main problem is in header files when I want to return UIColor. xCode tells me Expected a type error. Is there some way to handle with this situation?

Edit: my code (nothing special)

#import <Foundation/Foundation.h>

@interface NSString (Color)

- (UIColor *)rgbColor; //Expected a type
- (UIColor *)hexColor; //Expected a type

@end

Upvotes: 0

Views: 903

Answers (2)

Nazik
Nazik

Reputation: 8444

Use

@class UIColor;

above @interface.

It'll fix the expected a type error.

Upvotes: 2

Ketan Parmar
Ketan Parmar

Reputation: 27428

You should import if you are using UIColor.

Upvotes: 3

Related Questions