标签:
1.
@implementation ViewController
*/
//-(IBAction)redClick
//{
// self.Lable.text =@"我是红色";
// self.Lable.textColor = [UIColor redColor];
// self.Lable.backgroundColor = [UIColor blueColor];
//}
/*如果删除这个方法
UIview01[1252:54817] -[ViewController redClick]: unrecognized selector sent to instance 0x7fe292c18a60
UIview01[1252:54817] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException‘, reason: ‘-[ViewController redClick]: unrecognized selector sent to instance 0x7fe292c18a60‘
BUG:[ViewController redclick] 向这个不能识别的方法里发送了一个参数
================================================================================================
2.
@interface ViewController ()
/*
如果删除这个由类生产的属性
*/
//@property(nonatomic,weak)IBOutlet UILabel *Lable;
2016-08-15 13:05:44.481 UIview01[1608:66141] *** Terminating app due to uncaught exception ‘NSUnknownKeyException‘, reason: ‘[<ViewController 0x7fadc86b3750> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Lable.‘
BUG:找不到由此类产生的这个的属性路径
解决:以上两种BUG的产生都是因为在删除不需要的属性或者方法时并没有删和Storyborad之间的连接:
这里我们还可以注意一个 touch up ouside ,此属性的作用是当点击后在控件的外部松开则触发事件
标签:
原文地址:http://www.cnblogs.com/HankMoody/p/5772727.html