问题
My code works all fine but there is always two console message every time I run it. app works fine but the messages just bugs me so much. Could anyone tell me what is wrong with my code and what does these console message means,thanks
2016-06-13 14:31:15.014
LazyHackintoshGenerator[1625:37250] Could not connect action, target class
LazyHackintoshGenerator.ViewController does not respond to -getFile:
回答1:
Likely a control's action in your storyboard is linked to a method getfile that no longer exists
回答2:
- Select your ViewController.
- Right-click on its “View Controller” icon (the blue circle with a white square inside).
- Look for warning icons (yellow triangles).
- Hover over them. An explanation of the problem will appear. As Feldur said, the problem is probably a leftover link from your storyboard to a method that does not exist anymore (maybe you renamed it or deleted it manually). Remove the link by clicking on the cross, and, if needed, re-link to the appropriate method in your code.
Here is an example of what it will look like in Interface Builder.
来源:https://stackoverflow.com/questions/37783259/swift-viewcontroller-does-not-respond-to-getfile-could-not-connect-action-tar