开发者

tabBar navigation and building detail tables from UITableView

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:Y开发者_JAVA技巧ES];
    //release it
    self.detailsView = nil;
}


Check your frame size.

 NSLog(@" detail view frame: %f,%f %f x %f",detailsView.frame.origin.x,detailsView.frame.origin.y,
     detailsView.frame.size.width, detailsView.frame.size.height);

Maybe the size is 0 (or really small) or the x,y is off-screen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜