我有一个来自Yelp的JSON对象,我无法弄清楚如何使用Swift Codable 访问titlein categories.这是JSON(为了便于阅读,删除了一些元素):
{
"businesses": [
{
"id": "fob-poke-bar-seattle-2",
"name": "FOB Poke Bar",
"is_closed": false,
"review_count": 421,
"categories": [
{
"alias": "poke",
"title": "Poke"
},
{
"alias": "salad",
"title": "Salad"
},
{
"alias": "hawaiian",
"title": "Hawaiian"
}
],
"rating": 5,
"coordinates": {
"latitude": 47.6138005187095,
"longitude": -122.343868017197
},
"price": "$$",
"location": {
"city": "Seattle",
"zip_code": "98121",
"country": "US",
"state": "WA",
"display_address": [
"220 Blanchard St",
"Seattle, WA 98121"
]
},
}
Run Code Online (Sandbox Code Playgroud)
我name很容易访问第一级属性,我访问lattitude …
我目前收到以下错误:
Failed to set (borderIBColor) user defined inspected property on
(UIView): [<UIView 0x7f8dda6075b0> setValue:forUndefinedKey:]: this
class is not key value coding-compliant for the key borderIBColor.
Run Code Online (Sandbox Code Playgroud)
我需要更改用户定义的属性,但我不知道编译器指的是哪个 UIView!
有什么方法可以获取这些信息并找到它UIView以便我可以修复它?在storyboard试图找到它的过程中,我一直在浏览每一个视图,但这需要永远。