IBAction和IBOutlet

IBAction
从返回值角度上看,作用相当于void
只有返回值声明为IBAction的方法,才能跟storyboard中的控件进行连线

IBOutlet
只有声明为IBOutlet的属性,才能跟storyboard中的控件进行连线

 

经典错误

如果遇到这种错误,90%的可能都是因为连线有问题,比如一些线已经“过期”
'NSUnknownKeyException', reason: '[<ViewController 0x7fdf7048b200> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key

posted @ 2016-08-02 22:26  iFat  阅读(187)  评论(0编辑  收藏  举报