Objective-C 中,@class & #import 的区别

Keypoints:

"#Import"linkstheheaderfileitcontains.Everythingintheheader,includingpropertydefinitions,methoddeclarationsandanyimportsintheheaderaremadeavailable.Importprovidestheactualdefinitionstothelinker.

@classbycontrastjusttellsthelinkernottocomplainithasnodefinitionforaclass.Itisa"contract"thatyouwillprovideadefinitionfortheclassatanotherpoint.

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

相关推荐