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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:41:09+00:00 2026-05-26T11:41:09+00:00

I have a subclassed UIView that will not draw it’s subviews. Or at least,

  • 0

I have a subclassed UIView that will not draw it’s subviews. Or at least, it’s not showing it’s subviews. The whole view is loaded from a nib.

Also, strangely, it will not draw the background I set in IB. (I’m using Xcode 4.2).

But it will draw the parent view what I specify in awakeFromNib such as background, border, and corner.

The opaque property is set to NO. Any suggestions are appreciated!

  • 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-26T11:41:09+00:00Added an answer on May 26, 2026 at 11:41 am

    When you load a view from a nib, e.g. using

    [[NSBundle mainBundle] loadNibNamed:  owner:self]
    

    you still need to then add that loaded view as a subview to one of the views currently visible in your window for that view to become visible. Having an outlet to it from your owner ensures that the view is loaded and you have a reference to it – but that alone does not cause it to be added as a subview to the owner.

    So (assuming self is the parent view and the owner in the nib) make sure first that you definitely have the outlet set in the nib from the owner to the view being loaded, and then that you are doing a

    [self addSubview:loadedView]
    

    (Where loaded view is the view in the nib who’s owner is self).

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

Sidebar

Related Questions

I have the following code in a UIView subclass that will move it off
I have subclassed UIView and created a NIB that controls the main logic for
I have subclassed a UIView that already handles single touches and drags. I want
I currently have a UIView subclass that acts as my header view for my
I have subclassed UIView so I can draw some lines in it. In this
I have a UIView that contains a number of CALayer subclasses. I am using
I have a UIView subclass that draws itself when -drawRect: is called. It only
I want to have a UIView subclass that has a border image, but I
Currently, I have a UIView subclass that stamps a single 2px by 2px CGLayerRef
If I have a UIView (or UIView subclass) that is visible, how can I

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.