objective-c - cocoapods 引用的包,一会@import, 一会import "",是我打开方式不对?
过去多啦不再A梦
过去多啦不再A梦 2017-05-02 09:18:36
0
3
529

引入了几个包,在代码里引用的时候,有的需要

@import module;

有的需要

imoprt <module>

有的需要

import "module.h"

搞得人都屌乱了,这里面有什么原则没有?什么时候用什么方式?

过去多啦不再A梦
过去多啦不再A梦

reply all(3)
仅有的幸福

@import is modules syntax. Use "Language - Modules." in Xcode to set Enable Modules and Link Frameworks Automatically to Yes, which can support @import syntax

#import<> is the header file in the system framework, and "" is the header file in the project.

Ty80

Are you using a new version of Xcode? Just add something to this

滿天的星座

<> The search starts from the system framework
"" starts from the project itself
Old versions can be mixed, but the search speed is different
I don’t know what the unsigned ones are, I only know these

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template