Stackoverflow fellows.
I’m trying to load a plist. But then plist‘s root can be NSArray or NSDictionary. Is there prettier way to determine which one it is (by the header’s type of root) NSArray or NSDictionary? Obviously, It is very common pull up file from NSDictionary or NSArray or NSData.
Thanks.
By using the
NSPropertyListSerializationclass you can deserialize your plist file from anNSDataand then with a fast check understand if it’s aNSDictionaryor aNSArraythroughisMemberOfClass: