我在 Xcode 中创建了 swift 项目,并将 Button 添加到情节提要中。该按钮的 IBAction 被命名为“WhenButtonPresed”,但是当我运行应用程序时,它崩溃了,尽管我没有任何名为“sd”的 IBAction,但我收到了下面发布的错误
代码:
2017-06-19 08:46:21.909 Test_SWIFT_FMDB-1[958:18819]
<CATransformLayer: 0x7fc353d2e1d0> - changing property
contentsGravity in transform-only layer, will have no effect
2017-06-19 08:46:22.188 Test_SWIFT_FMDB-1[958:18819] *** Terminating
app due to uncaught exception 'NSUnknownKeyException', reason:
'[<Test_SWIFT_FMDB_1.ViewController 0x7fc353d25fa0>
setValue:forUndefinedKey:]: this class is not key value coding-
compliant for the key sd.'
*** 首先抛出调用堆栈: