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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:46:35+00:00 2026-05-26T19:46:35+00:00

I have a class that inherits from UIView, and this class has some controls

  • 0

I have a class that inherits from UIView, and this class has some controls that I have placed on it in IB.

Then, in the NIB file for my main view controller, I placed a view, and changed the class to my subclass, and created an outlet for the subclass. However, when I run my application, the app does not display the UI that I put on the subclass, it is just blank.

I am getting the initWithCoder and awakeFromNib messages in the subclass, here is what the subclass .m file basically looks like:

#import "AnalyticsDetailView.h"

@implementation AnalyticsDetailView

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    return self;
}

- (void)awakeFromNib
{
    [super awakeFromNib];
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        NSArray *v = [[NSBundle mainBundle] loadNibNamed:@"AnalyticsDetailView" owner:self options:nil];
        [self addSubview:[v objectAtIndex:0]];
    }

    return self;
}

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

@end

I am not sure if the initWithFrame is correct, but since that method is not firing, I suspect that it doesn’t matter at this point. If I put a breakpoint in my app after I have seen the subclass methods fire, I can look at the outlet subclass and the frame is the same as what I have created in IB.

Anyone have any suggestions (missing code, bad IB connections, etc.) on what to look for that I have missed or am doing incorrectly? Thanks.

  • 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-26T19:46:35+00:00Added an answer on May 26, 2026 at 7:46 pm

    To get your interface to appear, you’ll need to explicitly instantiate a AnalyticsDetailView from your parent view controller.

    So in somewhere like the viewDidLoad: or viewWillAppear: methods, you’ll add a line that says:

    AnalyticsDetailView * newView = [[AnalyticsDetailView alloc] initWithFrame: CGRectMake(x,y,height,width)]; 
    [parentView addSubview: newView];
    [newView release]; // subview retains for us
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that inherits from a base class (this contains a lot
I'm developing an iPhone application. I have a class that inherits from UIView .
I have a class that inherits from defaultdict like this: class listdict(defaultdict): def __init__(self):
I have a class that inherits from MemoryStream in order to provide some buffering.
I have GraphicView class that inherits from UIView. Its initWithFrame method is: @implementation GraphicsView
I have a class that inherits from a dictionary in order to add some
I have a class that inherits from a base class. This base class exposes
I have a class that inherits from Hash . When this class itself gets
I have a class that inherits from UIView However when trying to use the
Newbie Python question. I have a class that inherits from several classes, and some

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.