Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quartz Core Import not required in Xcode 5?

Tags:

Just stumbled across this today. I am getting warnings in Xcode 4.6 if I try to access the CALayer without importing <QuartzCore/QuartzCore.h>. The same however works fine in Xcode 5.

like image 351
Anonymous Avatar asked Dec 11 '13 11:12

Anonymous


1 Answers

Yes, <QuartzCore/QuartzCore.h> is automatically included, but this seems to be more a side effect than intended, because it is included only indirectly:

  • <UIKit/UIKit.h> includes <UIKit/UISlider.h>,
  • in the iOS 7 SDK, <UIKit/UISlider.h> includes <QuartzCore/QuartzCore.h>, due to new instance variables in the UISlider class (of the CAShapeLayer type).

In addition, Xcode 5 has a new build setting "Link Frameworks Automatically", which is by default on (and requires the new "modules" feature), so that the QuartzCore framework is also added to the link libraries.

like image 57
Martin R Avatar answered Sep 30 '22 08:09

Martin R