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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:01:02+00:00 2026-05-26T02:01:02+00:00

I have subclassed UIViewController like so: @interface MyClass : UIViewController I dont have a

  • 0

I have subclassed UIViewController like so:

@interface MyClass : UIViewController

I dont have a xib file for the controller, instead I would just like to use a blank UIView and I will layout elements programmatically on that. The problem arrises when I try and push this view controller.

MyClass * thing = [[ImageGallery alloc] init];
[self.navigationController pushViewController:thing animated:YES];

A new title bar is animated in, but there is no view, its see through, so I end up seeing a static background I set on my main “window/view”. How should I properly subclass a UIViewController without a xib?

  • 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-26T02:01:04+00:00Added an answer on May 26, 2026 at 2:01 am

    What you have described is correct behaviour so far.

    You will want to override the -(void)loadView method, and after the [super loadView]; call, you can set your background colour and begin to place the objects in programatically, that you desire.

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

Sidebar

Related Questions

I have a subclassed UIViewController that's acting as an ABPeoplePicker Navigation Controller Delegate. This
I have an interface definition like this: @interface MasterPanelsController : UIViewController { PanelSuperclass *panels[3];
I have subclassed UIViewController into a new class, PageViewController (I'm writing a simple book
I have written a subclass of UIViewController which creates a view programmatically, instead of
I have subclassed Process like so: class EdgeRenderer(Process): def __init__(self,starter,*args,**kwargs): Process.__init__(self,*args,**kwargs) self.starter=starter Then I
I have a very simple subclass of UIViewController : @interface RoastChickenViewController : UIViewController {
I have always sort of wondered when to use a UIView vs. a UIViewController
Issue: I have a standard subclassed NSManagedObject (see below). I have a view controller
I have a main UIViewcontroller (vcMain) with two UIViewControllers subclassed from the main one.
I have a UITabBarController created programaticaly that manages 4 subclasses of UIViewController. Something like:

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.