Cannot assign value nil for key "self.imageView".
今天打开工程调试界面时报错
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSDictionaryOfVariableBindings failed because either one of the values is nil, or there's something wrong with the way the macro is being invoked. Cannot assign value nil for key "self.imageView". Keys:(
"self.imageView",
"self.descLabel"
)'
解决方法:MASAttachKeys(self.imageView,self.descLabel)中的MASAttachKeys将内容设置为 assign
所以MASAttachKeys应放在控件创建之后
网友评论