Imported from the Apple Support Forums via the Wayback Machine 🔗
They are the same thing. One's a public interface and the other one's private. Stick to the public interface and you won't have any problems if Apple ever decides to change the private implementation.
0
Bang A. Lore·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Because NSString and CFString represent different interfaces to the same underlying object whose name is kept hidden from view at all times except these.
0
Heedless·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I get that NSString and NSCFString are not the same thing and that I can get my code to work with:
if ([myObject isMemberOfClass:[NSString class]]) { NSLog(@"Is Member of NSString: YES"); }
But I still find it odd that I say: make a NSString, but I end up with a NSCFString
0
Bang A. Lore·
Imported from the Apple Support Forums via the Wayback Machine 🔗
They are the same thing. One's a public interface and the other one's private. Stick to the public interface and you won't have any problems if Apple ever decides to change the private implementation.
0
Heedless·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Ok, I get it, thanks a lot
0
MarkDouma®·
Imported from the Apple Support Forums via the Wayback Machine 🔗
They aren't the same thing. Read over Class Clusters for more info.
Also, you should be careful when using isKindOfClass: (or isMemberOfClass:) with objects represented by a class cluster, as noted in NSObject Protocol reference.
Depending on what you want to do after determining whether the object is an NSString or not, you could use isKindOfClass:.
Hope this helps...
0
Bang A. Lore·
Imported from the Apple Support Forums via the Wayback Machine 🔗
MarkDouma® wrote:
They aren't the same thing.
As far as he's concerned, they are. That's the magic of toll-free bridging.