CGRect CGFloat can not be used

I still shining stage of the code of others knock something == shame which

Closer to home, knock on the code today, it was found as long as the class that inherits NSObject can not be used CGRect CGFloat;

会报:Unknown type name 'CGRect'; did you mean 'Rect'? 

 Or  Unknown type name 'CGFloat'

Tangled one afternoon ---

Was found with the help of friends is the problem XCode6

Create a project before XCode6 will automatically import Foundation.h and UIKit.h

The Xcode6 only imported Foundation.h

So long as the class header portion plus

#import <UIKit/UIKit.h>

就可以了
---
虽然看不见这片随笔 但是还是要感谢小九大神!!

Reproduced in: https: //www.cnblogs.com/Rachel0829/p/4085838.html

Guess you like

Origin blog.csdn.net/weixin_34191845/article/details/93358781