> On 22 Sep 2016, at 9:44 AM, Gabriel Zachmann <z...@tu-clausthal.de> wrote:
> I have found on the net
That isn’t always a recommendation ;)
> if ( context == (__bridge void *) @"mediaLibraryLoaded" )
Don’t do this, even if it appears to work. You got lucky, or are taking
advantage of undocumented implementation details.
This should be: if([(NSString*)context isEqualToString:@“mediaLibraryLoaded”])…
I expect the first thing -isEqualToString: does is a pointer comparison, so
it’s unlikely to be significantly less performant for the case of when the
pointers are literally identical.
Cocoa-dev mailing list (Cocoaemail@example.com)
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 arch...@mail-archive.com