Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:57:25+00:00 2026-06-06T21:57:25+00:00

I have a tab based application. On the first tab I have several views

  • 0

I have a tab based application. On the first tab I have several views one of which is a navigation controller. My goal is to load this list view(working) then goto a detailview on the cell click(not working).

On the cell click I am logging

NSLog(@”%@”,self.navigationController);

which is returning a null. I can only assume that I have not done something right with setting up the navigation controller but I do not know what.

on button click the table view is called:

#import "Reviews.h"
#import "XMLParser.h"
#import "Detailed_Review.h"

@implementation Reviews

@synthesize reviewsTableView;

XMLParser *xmlParser;
CGRect dateFrame;
UILabel *dateLabel;
CGRect contentFrame;
UILabel *contentLabel;

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark -
#pragma mark Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 
{
    return [[xmlParser reviews] count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{

    static NSString *CellIdentifier = @"Cell";
Review_Object *currentReview = [[xmlParser reviews] objectAtIndex:indexPath.row];

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) 
    {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];

        CGRect contentFrame = CGRectMake(10, 2, 265, 30);
        UILabel *contentLabel = [[UILabel alloc] initWithFrame:contentFrame];
        contentLabel.tag = 0011;
        contentLabel.numberOfLines = 2;
        contentLabel.font = [UIFont boldSystemFontOfSize:12];
        [cell.contentView addSubview:contentLabel];

        CGRect reviewFrame = CGRectMake(10, 40, 265, 10);
        UILabel *reviewLabel = [[UILabel alloc] initWithFrame:reviewFrame];
        reviewLabel.tag = 0012;
        reviewLabel.font = [UIFont systemFontOfSize:10];
        [cell.contentView addSubview:reviewLabel];
    }

UILabel *contentLabel = (UILabel *)[cell.contentView viewWithTag:0011];
    contentLabel.text = [currentReview rating];

UILabel *dateLabel = (UILabel *)[cell.contentView viewWithTag:0012];
    dateLabel.text = [currentReview review];

    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 55;
}

#pragma mark -
#pragma mark Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{
     Detailed_Review *dvController = [[Detailed_Review alloc] initWithNibName:@"Detailed_Review" bundle:[NSBundle mainBundle]];

    [self.navigationController pushViewController:dvController animated:YES];
    NSLog(@"%@",self.navigationController);
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];

    xmlParser = [[XMLParser alloc] loadXMLByURL:@"http://www.mywebsite.com/api/reviews/xml.php?page=1"];

    self.title = @"Reviews";
}

- (void)viewDidUnload
{
    [self setReviewsTableView:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
}

- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

@end

xib photos:

first tab.xim

devtailview.xib

.h file:

#import <UIKit/UIKit.h>
#import "XMLParser.h"
#import "Review_Object.h"

@interface Reviews : UIViewController

@property (retain, nonatomic) IBOutlet UITableView *reviewsTableView;

@end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:57:26+00:00Added an answer on June 6, 2026 at 9:57 pm

    You omitted the part where the navigationController is allocated and initialized. Can you add that, including the relevant part from the .h file too?

    Either create it with IB or programatically, see https://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewControllerPGforiOSLegacy/NavigationControllers/NavigationControllers.html#//apple_ref/doc/uid/TP40011381-CH103-SW27

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a tab bar based application, If I have one controller pushed in the
I have tab based application which also have Navigation controllers, When the user in
I have a TabController-based storyboard application with 4 different navigationController, one each tab. The
I have a tab bar controller (its a tab bar based application, so tab
I have written a tab based iPad application which has done well. I never
I have a tab-based application for windows, which I am developing by myself. I
In building my application which is a tab based application, from the first tab,
I am making a view based application in which the first controller is viewcontroller
I have a tab-based application with a number of navigation controllers in the tabs.
I have a tabController-based iPhone application. First tab is associated with a table view

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.