如何在UIImageView中解析这个数据?

时间:2016-08-02 15:03:43

标签: ios objective-c google-places

如何在UIImageView中解析这个数据?

这是我的代码:

photos =(
        {
            height = 2988;
            "html_attributions" =                     (
            "<a href=\"https://maps.google.com/maps/contrib/109461257917544660371/photos\">Marie-Claude Brousseau</a>"
                );
                "photo_reference" = "CoQBdwAAAD1yAyXPTuN2ZyRD4VZGAqVTT3ZCWSLe_RHSLx_ea-GLe0TsaRSpqIsHhvTj82GljPJG5y-Lrk6809jI5KzvcUjXroCcaAlEkgDLhQma5xsvA0vF4DwdoEZ0wWUZxXHs01BxedzegpQSgB4zVnzbUaAZaN_D5dEr0UOp4awIExe2EhAISA1lOL6VARBNLg9a1r1tGhQf3RgXpVfnPBtYPH6RY5pqmJE0mQ";
                width = 5312;
            }
        );

1 个答案:

答案 0 :(得分:-1)

使用NSJSONSerialization类如下:

NSData *data = [photos dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *propertyList = [NSJSONSerialization JSONObjectWithData:data
  options:0 error:NULL];