Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个看起来像这样的字符串:
"[{"ImageTagID":78,"Xpixel":408,"Ypixel":69,"Xpercent":17,"Ypercent":68,"ImageID":45617}]"
我如何将它分解成碎片?
谢谢,
这是一本字典。字典中有键和值。如果您需要特定值,则必须使用密钥获取它。
在 iOS 中是这样完成的,
int tagID = [yourdictionary objectForKey:@"ImageTagID"];
希望这可以帮助您开始。如果您有更多问题,请问我。
拆分字符串:
例子:NSArray *stringArray = [string componentsSeparatedByString: @","];
NSArray *stringArray = [string componentsSeparatedByString: @","];