xcode 未知类型“CGFLoat”。您指的是“CGFloat”吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20077062/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unknown type 'CGFLoat'. Did you mean 'CGFloat"?
提问by Genu


The popup issues is not very descriptive. Am I missing something here?
弹出问题不是很具有描述性。我在这里错过了什么吗?
回答by deanWombourne
What is imported into this file?
什么被导入到这个文件中?
I suspect either
我怀疑要么
(a) CGFloat isn't imported but XCode is being 'helpful'
(a) CGFloat 未导入但 XCode 是“有用的”
or
或者
(b) CGFloat has been defined twice somewhere.
(b) CGFloat 已经在某处定义了两次。
My money is on (a). CGFloatis part of core graphics, pulled in with UIKit so you need #import <UIKit/UIKit.h>somewhere in there.
我的钱在 (a) 上。CGFloat是核心图形的一部分,用 UIKit 拉进来,所以你需要#import <UIKit/UIKit.h>在那里的某个地方。
回答by zbMax
You just have a Linstead of lfor CGFloat
你只需要一个L,而不是l为CGFloat

