How to create an NSDictionary with multiple keys?

前端 未结 5 837
臣服心动
臣服心动 2020-12-30 12:34

I am not sure if what I am going to ask is actually an NSDictionary with multiple keys but ok.

What I want to do is create an NSDictionary

5条回答
  •  春和景丽
    2020-12-30 13:21

    Here is the structure:
    Your root object is NSMutableDictionary
    eventData - key for object NSMutableDictionary with keys and objects:
    ->key eventDate object NSString
    ->key eventLocation object NSMutableDictionary with keys and objects:
    ----> key latitude object NSNumber
    ----> key longitude object NSNumber
    -> key text object NSString
    -> key imageData object NSString later converted to NSData
    -> key imageFormat object NSString
    -> key expirationTime object NSNumber
    type key for object NSString
    title key for object NSString

提交回复
热议问题