Re: predefined macro iOS vs OS X
Re: predefined macro iOS vs OS X
- Subject: Re: predefined macro iOS vs OS X
- From: Marcel Weiher <email@hidden>
- Date: Sun, 18 Aug 2013 16:09:17 +0200
On Aug 18, 2013, at 15:06 , Kyle Sluder <email@hidden> wrote:
> On Aug 18, 2013, at 6:28 AM, Marcel Weiher <email@hidden> wrote:
>> On Aug 17, 2013, at 19:01 , Jean-Daniel Dupas <email@hidden> wrote:
>>
>>> You don't have to add explicit dependency to anything as NSGeometry.h already does that for you.
>>> Importing Foundation.h is enough to use CGRect on both OS X and iOS.
>>
>> That would be awesome and would mean I no longer need my PhoneGeometry.h hack.
>>
>> Alas, I just checked and did not find NSGeometry.h in the Foundation headers on iOS (and didn’t find NSRect or NSPoint anywhere either). Maybe I am missing something?
>
> You have it backwards. Jean-Daniel was saying that CGRect is defined on OS X without having to explicitly import CoreGraphics headers. So use CGRect instead of NSRect.
Ahh, crap, they did it backwards, seems to be the norm these days :-( I guess I’ll keep using PhoneGeometry.h :-)
Cheers,
Marcel
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden