读书人

Objective-C 中@class amp; #import 的

发布时间: 2013-10-16 11:29:46 作者: rapoo

Objective-C 中,@class & #import 的区别
Key points:
"#Import" links the header file it contains. Everything in the header, including property definitions, method declarations and any imports in the header are made available. Import provides the actual definitions to the linker.

@class by contrast just tells the linker not to complain it has no definition for a class. It is a "contract" that you will provide a definition for the class at another point.

原文出处:http://www.51testing.com/html/27/225927-231535.html

读书人网 >移动开发

热点推荐