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 7567073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:34:22+00:00 2026-05-30T14:34:22+00:00

Original question I have a class named RootViewController and my .h file has the

  • 0

Original question

I have a class named RootViewController and my .h file has the code below

#import "SEViewController.h"


@interface RootViewController : SEViewController{

}
@end

and my SEViewController looks like

@interface SEViewController : UIViewController
{
}

@end

How can i declare RootViewController as UITableViewController and also as SEViewController the same time?


Edited question

Now I have the code below, but I get warnings and the table view does not appear.

RootViewController.m:

#import <UIKit/UIKit.h>
#import "ApplicationCell.h"
#import "SEViewController.h"


@interface RootViewController : SEViewController <UITableViewDataSource, UITableViewDelegate>
{
    UITableView *tableView;
    ApplicationCell *tmpCell;
    NSArray *data;
}
@property (copy) NSArray *data;
@property(nonatomic,retain)UITableView *tableView;

@end

RootViewController.m:

#import "RootViewController.h"
#import "SubviewApplicationCell.h"


#define DARK_BACKGROUND  [UIColor viewFlipsideBackgroundColor]
#define LIGHT_BACKGROUND [UIColor clearColor];


@implementation RootViewController
@synthesize data;
@synthesize tableView = _tableView;
#pragma mark -
#pragma mark View controller methods


- (void)viewDidLoad
{
    NSString *dataPath = [[NSBundle mainBundle] pathForResource:@"rules" ofType:@"plist"];
    self.data = [NSArray arrayWithContentsOfFile:dataPath];
    self.navigationItem.title = @"rules";
    self.navigationController.navigationBar.tintColor = [UIColor blackColor];
    self.tableView = [[UITableView alloc]init];
    self.tableView.rowHeight = 73.0;
    self.tableView.backgroundColor = DARK_BACKGROUND;
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

    [super viewDidLoad];


}

- (void)viewDidUnload
{
    self.data = nil;
    [super viewDidLoad];

}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return YES;
}


#pragma mark -
#pragma mark Table view methods

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

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

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"ApplicationCell";

    ApplicationCell *cell = (ApplicationCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil)
    {

        cell = [[[SubviewApplicationCell alloc] initWithStyle:UITableViewCellStyleDefault
                                                            reuseIdentifier:CellIdentifier] autorelease];

    }



    cell.arrow = [UIImage imageNamed:@"circle"];
    cell.name = [data objectAtIndex:indexPath.row];

    return cell;
}

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{

    cell.backgroundColor =  LIGHT_BACKGROUND;

}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
   // [self.navigationController pushViewController:nil animated:YES];
    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}


#pragma mark -
#pragma mark Memory management

- (void)dealloc
{
    [data release];
    [super dealloc];
}

@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-05-30T14:34:24+00:00Added an answer on May 30, 2026 at 2:34 pm

    Why dont you make

    @interface SEViewController : UITableViewController
    {
    
    }
    

    Or, create SEViewController as UIViewController, put a table on it, and implement the UITableViewDelegate, and you are going to have the same.

    @interface SEViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
    {
    
    }
    

    For creating and adding a table to your view, use this code:

        - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        CGRect totalFrame = self.view.frame;
        UITableView *myTableView = [[UITableView alloc] initWithFrame:totalFrame style:UITableViewStylePlain];
        [self.view addSubview:myTableView];
        [myTableView release];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Original Question I am writting a logging class where the goal is to be
The original question is below, but I changed the title because I think it
Author post-edit: Chosen solution (Original question remains below this box) SUMMARY: You SHOULD NOT
Original question has been answered. Update addresses related question raised in comments. Original post:
I have an class named Foo. This class contains a collection of child objects
I have edited the original question since the same error is occurring the difference
SEE BELOW FOR SOLUTION BASED ON ANSWER/COMMENT from @Bertrand Le Roy ORIGINAL QUESTION: Not
Update: I have tried Sheldon's code below but I have struck a couple of
Ok, I'm quite new to CSS3. I have this code: <div class=Mat-Shadow-Box-Text> <div class=Mat-Shadow-Box-TextBleu2>
Original Question I want to be able to generate a new (fully valid) MP3

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.