Wednesday 15 July 2015

objective c - What is the reason behind giving Underscore in private header files of apple -


I have several apples. H (Private API) has seen. Most variables / structures / beliefs / classes are in the form of prefix _.

  #import & lt; Foundation / NSVLH & gt; #important & lt; Foundation / NSBJCRTM H & gt; @ Class NSString; Typedef structure _NSRange {NSUInteger location; Length of NSUINTER; } NSRange;  

My question is,

what is the reason behind giving an underscore & amp; Re-type with the proper one?

Objective-is globally open name space It is important that all names are unique, given first In addition to the reasons, Apple keeps all underscores for itself. This will help prevent accidental name collision.


No comments:

Post a Comment