一款应用程序在ipad和iphone上运行良好,但在为同一个应用程序构建并使用该版本后,它在iPad上崩溃(在iPhone上正常工作)。
我的代码:
-(void)everyBodyButtonClicked {
if([InternetUtility testInternetConnection])
{
UIButton * everyBody = ((UIButton *)[self.view viewWithTag:_wallEverybodyButton_tag]);
UIButton * bestMatch = ((UIButton *)[self.view viewWithTag:_wallBestMatchButton_tag]);
UIButton * favorite = ((UIButton *)[self.view viewWithTag:_wallFavoraiteButton_tag]);
everyBody.selected = YES;
bestMatch.selected = NO;
favorite.selected = NO;
// add code
everyBody.userInteractionEnabled = NO;
bestMatch.userInteractionEnabled = YES;
favorite.userInteractionEnabled = YES;
// add code end
collectionData = nil;
collectionData = [[DataController sharedInstance] getEveryBodyData];
[self reloadData];
if(collectionData == nil)
{
printf("\n\nif(everyBodyButtonClicked / collectionData == nil)");
DDLogVerbose(@"getEveryBodyDatafromStart Data not found in cache");
[self getEveryBodyDatafromStart];
}
[AppDelegate sharedInstance].isButtonTab = EVERYBODY_TAB;
}
else
{
[ViewUtilities showAlert:NSLocalizedString(@"", nil) :NSLocalizedString(@"Check network connection", nil)];
}
}
答案 0 :(得分:0)
您应该提供一些有用的信息来解决您的问题。但您可以连接设备和调试以获得该错误。我认为这是因为您发送了一些设备操作系统不支持的消息