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

  • Home
  • SEARCH
  • 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 8583135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:27:43+00:00 2026-06-11T21:27:43+00:00

I have following code in a subclass of UITableViewController. Under iOS 5.1 it works

  • 0

I have following code in a subclass of UITableViewController. Under iOS 5.1 it works fine, but under iOS 6, self.tableView is nil (both in simulator and on real device). Am I doing it wrong? Why isn’t the view set straight away after the init?

- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];

    if (self) 
    {
        UIView * bck = [[UIView alloc] init];
        [bck setBackgroundColor:[UIColor whiteColor]];
        self.tableView.backgroundView = bck;
        [bck release];
    }

    return self;
}

EDIT:

I’ve nailed down the problem:

I’ve got class

AccountsListViewController_iPad

which is subclass of

AccountsListViewController : UITableViewController

AccountsListViewController has it’s tableView & view loaded after init (as I would expect). AccountsListViewController_iPad on the other hand has it’s view and tableView equal to nil. I’ve removed everything from AccountsListViewController_iPad so now it looks as follows:

.h
#import <UIKit/UIKit.h>
#import "AccountsListViewController.h"
@interface AccountsListViewController_iPad : AccountsListViewController
@end

.m
#import "AccountsListViewController_iPad.h"
@implementation AccountsListViewController_iPad
@end

And still it’s view is nil. In my opinion, it should behave exactly the same as its superclass, but it doesn’t.

  • 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-11T21:27:45+00:00Added an answer on June 11, 2026 at 9:27 pm

    Alright, I’ve worked it out:

    There was AccountsListViewController_iPad class and associated AccountsListViewController_iPad.xib file. Xib, despite not being loaded anywhere in the code and file owner in xib not being AccountsListViewController_iPad, was still being loaded. For some reason, the table view in xib was set to property ‘table’ in file owner (which didn’t exist) and hence view and tableView were nil.

    I still don’t know why the xib was loaded or why it issue exist happen under iOS 5.x

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

Sidebar

Related Questions

I have a subclass of QTableWidget with the following code: connect(this, SIGNAL(cellChanged(int, int)), this,
I have the following code in my UIViewController subclass, however the willAnimateROtationToInterface is never
I have the following code in a UIViewController subclass: MyViewController *viewController = [[MyViewController alloc]
I have the following code in a UIView subclass that will move it off
I have following code: class EntityBase (object) : __entity__ = None def __init__ (self)
I have a UIViewcontoroller subclass and the following code is in my viewdidload ,
I have the following code in an Update method of a ContentProvider subclass: When
I added the following code in my UITableViewController subclass, it shows something like in
I have the following code in an NSView subclass: - (id)forwardingTargetForSelector:(SEL)aSelector { if ([super
I have the following example code: class A(object): def __init__(self, id): self.myid = id

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.