tabBar 导航和从 UITableView 构建详细信息表
我在 tabBar 导航中使用四个选项卡,第三个选项卡访问核心数据以加载已成功加载的表。我在创建详细信息表时遇到问题。我已设置并连接了详细的 nib 文件。我还设置了数据并正在运行。 当我点击一个单元格时,它会亮起,但没有任何反应。它甚至没有调用我的detailViewController。我已经为此苦苦挣扎了两天。如果有人有任何想法,请帮忙 - 谢谢
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (self.detailsView == nil)
{
self.detailsView = [[TipsROTRDetailViewController alloc]
initWithNibName:@"TipsROTRDetailViewController" bundle:[NSBundle mainBundle]];
}
TipsROTRInfo *info = [_fetchedResultsController objectAtIndexPath:indexPath];
TipsROTRDetails *detailsText = info.details;
self.detailsView.title = @"TIPS";
self.detailsView.descriptionText = detailsText.tipsText;
//NSLog(@"Text: %@", self.detailsView.descriptionText); **I do get data here
[self.navigationController pushViewController:self.detailsView animated:YES];
//release it
self.detailsView = nil;
}
I am using four tabs in my tabBar navigation, the third tab accesses Core Data to load a table which does get loaded successfully. I am having a problem creating a detail table. I have my detail nib file set up and connected. I also have the data set up and working.
When I tap on a cell, it lights up but nothing happens. It doesn't even call up my detailViewController. I've been struggling with this for two days. If anyone has any ideas, please help - thanks
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (self.detailsView == nil)
{
self.detailsView = [[TipsROTRDetailViewController alloc]
initWithNibName:@"TipsROTRDetailViewController" bundle:[NSBundle mainBundle]];
}
TipsROTRInfo *info = [_fetchedResultsController objectAtIndexPath:indexPath];
TipsROTRDetails *detailsText = info.details;
self.detailsView.title = @"TIPS";
self.detailsView.descriptionText = detailsText.tipsText;
//NSLog(@"Text: %@", self.detailsView.descriptionText); **I do get data here
[self.navigationController pushViewController:self.detailsView animated:YES];
//release it
self.detailsView = nil;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查您的镜框尺寸。
也许尺寸为 0(或非常小)或 x,y 超出屏幕。
Check your frame size.
Maybe the size is 0 (or really small) or the x,y is off-screen.