问题
I'm getting an lldb error whenever I click on a specific tab. The tab is called Account and its supposed to pull data from a child node called "requests" and display that data in a list(table view controller).
I've done this multiple times before. I'm even using my own recycled code for this task, but the error keeps showing up. I've already made sure each button/label is connected to the view controller and I've made sure none are disconnected.
The error message is saying that my request object isn't key-code compliant, but that's not the case either. What else could it be? This is the code along with some screenshots:
Here is the method I'm using. The error only comes up when I call this function. Other than that, the screen is just blank, so I figured that the issue has to be within the function. btw, requestsArray is an array of requests declared as such: var requestsArray = [requests]()
Heres the rest of the code from that view controller:
EDIT
回答1:
In Swift 4, the vars need to be marked as @objc like this
class requests: NSObject {
@objc var from: String?
@objc var location: String?
...
}
来源:https://stackoverflow.com/questions/47149903/lldb-error-with-firebase