Anyone else missing kCGLineCapRound?

I've been experimenting with some code in Xcode 7 using CGContextSetLineCap:


CGContextSetLineCap(context, kCGLineCapRound)


This worked in the first Xcode 7 beta, but it doesn't work in the second beta. I get a compile-time error:


Use of unresolved identifier 'kCGLineCapRound'


I've looked around a little, but I haven't found anything about this changing, or where I might import/include the kCGLineCapXXX constants.

Accepted Reply

Try

CGLineCap.Round
, or just
.Round
. I noticed some (all?) of those constants have been changed over to enums, which is great.

Replies

Try

CGLineCap.Round
, or just
.Round
. I noticed some (all?) of those constants have been changed over to enums, which is great.

That did it. I remember seeing at least a couple of references to this kind of change to enums at WWDC, but that didn't click with this for some reason. :-)


Thanks.

I like the change to enums, but it's probably something the migrator should pick up and offer to fix.

What a great idea! ;-)


It would also be nice if the docs had some kind of note about the change. I may have overlooked it, but a search for the old constant should point to the new enum way of doing it. Of course, it's still an early beta, so maybe all that is on the to-do list.