*** Assertion failure in -[NSLayoutConstraint constant], /SourceCache/Foundation/Foundation-992/Layout.subproj/NSLayoutConstraint.m:560 2012-10-01 14:01:01.889 RemindMe[1116:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '(null)'
我什么都没干。。。viewDidLoad里加了一个button
// button self.mybtn = [UIButton buttonWithType:UIButtonTypeCustom]; self.mybtn.frame = CGRectMake(106, 236, 110, 40); [self.mybtn setBackgroundImage:[UIImage imageNamed:@"btnbg.png"] forState:UIControlStateNormal]; [self.mybtn addTarget:self action:@selector(clicked) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:self.mybtn];
就这么简单的代码,他就报错了。。。求解,怎么回事啊。。。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
应该是
self.mybtn setFrame: