Re: Difference between NSPoint, NSSize, NSRect and the CG Versions


Dave
 

Well,

typedef CGRect NSRect;

So, it looks like they are one and the same thing? But in that case why are there two sets?

I’m just trying to understand what these different types are supposed to be used for.

Cheers
Dave

On 31 Aug 2017, at 13:05, Alex Zavatone <zav@...> wrote:

Look at the types that back them.

Structs and CGFloats?

On Aug 31, 2017, at 6:03 AM, Dave <dave@...> wrote:

Hi,

Is there any real difference between NSPoint, NSRect, NSSize etc. and the CG versions?

I can use the CG Versions on Mac and iOS but the NS versions only on Mac.

If I only used the CG versions it would compile ok for both platforms, but is this wise, or is it best to use NS on Mac?

All the Best
Dave




Join cocoa@apple-dev.groups.io to automatically receive all group messages.