__bridge cast on CF object stored in NSDictionary?
__bridge cast on CF object stored in NSDictionary?
- Subject: __bridge cast on CF object stored in NSDictionary?
- From: Rick Mann <email@hidden>
- Date: Tue, 13 Dec 2011 18:40:09 -0800
I've read the docs a couple times, but still am not sure what's going on in this instance:
CTFontRef f = CTFontCreateWithName((__bridge CFStringRef) name, inFont.pointSize, NULL);
[self.currentAttrs setValue: (id) f forKey: (NSString*) kCTFontAttributeName];
CFRelease(f);
self.currentAttrs is an NSMutableDictionary. The CTFontRef f is generating an error when passed to setValue:
Cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast
What type of __bridge cast should I use here?
Thanks,
Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden