Thursday, March 31, 2016

< Angular > & " Quotes " Import in iOS


Hey Folks,

I have seen many times people discussing on this matter so today i thought to write my own views on it.
  • Objective C has grasped this from C / CPP
  • Quotes" " indicates searching header in local / current working directories and if it doesn't find a match then moves on to check the system paths    whereas Angular's < > are used for searching in System Headers.

#import <something> : compiler looks in all include directories.
#import "something"  : compiler looks only in the directory of the file with the include in it.


Both ViewController & Analytics header exists within my local project directory so using Quotes to add them





UIKit is a System Header so accessing using Angular braces. However they can be accessed via Quotes as well :)




Hope i made it clear to some extent :)




1 comment: