0
我有一个名为'Sunset'的单元格的UITableView。按下UITableViewCell后,视图切换到“infoView”,它从.txt文件加载一些文本。当按下“后退”按钮时,视图切换回UITableView,但是存在问题。加载视图后,UITabBar不见了!既然它消失了,就不可能回到另一种观点。UITabBar在选择UITableViewCell时消失
我曾尝试:
self.hidesBottomBarWhenPushed = NO;
代码:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
UITableViewCell *cellSelected = [tableView cellForRowAtIndexPath:indexPath];
NSString *cellTitle = cellSelected.textLabel.text;
if (cellTitle == @"Sunrise")
{ //Swap views
informationView *iv = [[informationView alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:iv animated:YES];
}
}
让我们来看看在didSelectRowAtIndexPath方法的代码,并在其中创建您的tableView –
随时修改你原来的问题增添日e代码,而不是添加评论... –