How to get object for key from NSDictionary?

后端 未结 3 2023
耶瑟儿~
耶瑟儿~ 2021-02-20 02:04

In dictionary named dict the key value pair is:

\"alba\\U2019s window\" = \"A model in westindies.\";

And to send

3条回答
  •  轮回少年
    2021-02-20 02:50

    Make sure your dict isn't null; sending a message to a null object will silently fail and return null.

    Another way to check your key/values is to simply NSLog(@"%@",dict); and this will show you the contents of the dictionary. Note that this output only shows quotes around values when the value contains a space.

    Also, make sure you're using the same pairs of strings as the key - it looks like you're using "alba\U2019s window" in addition to "alba's window".

提交回复
热议问题