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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:01:51+00:00 2026-05-13T13:01:51+00:00

I am trying to set up my TableView dynamically froma configuration file and have

  • 0

I am trying to set up my TableView dynamically froma configuration file and have been trying to override the following template code

- (id)initWithStyle:(UITableViewStyle)style {
    // Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
    JeanieAppDelegate *appDelegate = (JeanieAppDelegate *)[[UIApplication sharedApplication] delegate];

    if (self = [super initWithStyle:(UITableViewStyle*)appDelegate.skin.tableViewStyle]) {
    //1 if (self = [super initWithStyle:UITableViewStyleGrouped]) {
    //2 if (self = [super initWithStyle:style]) {
    }
    return self;
}

The 2 commented lines work (no 2 is one which comes with the template). I have defined my variable using the default enum as follows:

@interface Skin : NSObject {
    UITableViewStyle *tableViewStyle;   
}

@property (nonatomic) UITableViewStyle *tableViewStyle; 

@end

However my code return an incompatible type error, any ideas why?

  • 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-13T13:01:51+00:00Added an answer on May 13, 2026 at 1:01 pm

    UITableViewStyle is not a pointer type

    @interface Skin : NSObject {
        UITableViewStyle tableViewStyle;   
    }
    
    @property (nonatomic) UITableViewStyle tableViewStyle; 
    
    @end
    

    And you shouldn’t need to cast it in the argument to the supermethod there. The compiler should know what type it is.

    [super initWithStyle:appDelegate.skin.tableViewStyle]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 320k
  • Answers 320k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer i = ['title', 'email', 'password2', 'password1', 'first_name', 'last_name', 'next', 'newsletter']… May 14, 2026 at 12:17 am
  • Editorial Team
    Editorial Team added an answer Yes, you can programatically deploy just the MDX script. There… May 14, 2026 at 12:17 am
  • Editorial Team
    Editorial Team added an answer There is already a product from Red Gate called SQL… May 14, 2026 at 12:17 am

Related Questions

I am trying to create a UITableView Section that contains two buttons aligned horizontally.
Let me start off by saying Im VERY new to iphone development, but Im
I'm trying to keep my code clean and keep the number of files down.
Possible Duplicate: How to implement re-ordering of CoreData records? I'm trying to find a
I am a cocoa newbie trying to create an iPhone app including Core Data.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.