KDe*_*kar 3 iphone xcode ios ios5 ios6
我得到的错误就像
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The NIB data is invalid.'
对于iOS 5.0即使我取消了自动版式,并为所有版本的iOS为customcell部署支持.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CustomCellIdentifier = @"GroupListCell";
GroupListCell *cell = (GroupListCell *)[tableView dequeueReusableCellWithIdentifier: CustomCellIdentifier];
if (cell == nil)
{
NSArray *nib;
if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
{
nib= [[NSBundle mainBundle] loadNibNamed:@"GroupListCell" owner:self options:nil];
}
else{
nib= [[NSBundle mainBundle] loadNibNamed:@"GroupListiPhoneCell" owner:self options:nil]; // sigabrt
}
// cell implementation code..
}
}
Run Code Online (Sandbox Code Playgroud)
此代码适用于iOS6.0但不适用于iOS 5.0.
问题是什么?我错过了什么.
| 归档时间: |
|
| 查看次数: |
8843 次 |
| 最近记录: |