部分解决办法摘自网络
1.没找到对应的方法
'NSInvalidArgumentException',reason:'-[TestClass initEvent]:unrecognized selector send to instance 0x10011b330'
这里就是TestClass没有找到initEvent方法
2.找不到AViewController.xib,可能是xib的名字写错了,或者类与xib没有关联
2012-08-18 22:52:33.922 HelloiPhone[667:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/xue/Library/Application Support/iPhone Simulator/6.0/Applications/063D5459-6BE3-43A6-8EB3-F03A43C42917/HelloiPhone.app> (loaded)' with name 'AViewController''
3.uiviewController创建的时候关联了xib,
reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "RootViewController" nib but the view outlet was not set.'
4.
reason: ‘Could not instantiate class named NSLayoutConstraint
5.
reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'没有storyboard,UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath]; 将 forIndexPath:indexPath删掉即可,因为这个是和storyboard是对应配套的
6.Xcode5无法设置Deployment Target的解决方法
使用XCode5创建新项目的时候发现无法修改Deployment Target,只能选择iOS7,这是由于XCode5默认会选择在64位的环境下运行,在Build Settings中修改Architectures为Standard architectures(armv7, armv7s),回到General中即可修改Deployment Target为4.3以上的版本。
7.连了两次outlet
setValue:forUndefinedKey this class is not key value coding-compliant for the key有可能是连了两次
'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MainViewController" nib but the view outlet was not set.'