Re: What is the equivalent of SetSystemUIMode() in Leopard and above?
Re: What is the equivalent of SetSystemUIMode() in Leopard and above?
- Subject: Re: What is the equivalent of SetSystemUIMode() in Leopard and above?
- From: Charles Srstka <email@hidden>
- Date: Tue, 26 Jan 2010 23:36:00 -0600
On Jan 26, 2010, at 10:39 PM, Jesper Storm Bache wrote:
> I don't have the entire thread on this machine so I apologize if I am repeating someone else.
>
> When you are ready do say "10.6 and above", then you can consider using
> [NSApplication setPresentationOptions]
> In the meantime SetSystemUIMode works well in both 32 and 64 bit binaries.
>
> Jesper Storm Bache
Or you could just do something like this:
if(floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5)
{
[NSApp setPresentationOptions:whatever];
}
else
{
SetSystemUIMode(whatever);
}
You could also use if([NSApp respondsToSelector:@selector(setPresentationOptions:)) if you prefer. I like to explicitly test for the version number though, so that once I *am* ready to say “10.6 and above”, it’s easy to search for and remove all the compatibility cruft that’s in there to make older versions work.
Charles_______________________________________________
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