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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:57:47+00:00 2026-06-08T12:57:47+00:00

I have a class that is a UIViewController, so in my ‘MyViewController.h’ I have:

  • 0

I have a class that is a UIViewController, so in my ‘MyViewController.h’ I have:

@interface MyViewController : UIViewController

However, in ‘MyViewController.m’, if I try and override loadView, -(void)loadView doesn’t autocomplete and since my view isn’t showing up, I believe that this is hinting at the problem.

I’m sure I’m doing something stupid but I can’t find anything on the matter.

Here’s my loadView if it helps:

-(void)loadView
{
    CGRect screenRect = [[UIScreen mainScreen] bounds];
    CGFloat screenWidth = screenRect.size.width;
    CGFloat screenHeight = screenRect.size.height;

    myInputView = [[MyInputView alloc] initWithFrame:CGRectMake(0, 0, screenWidth,screenHeight)];
    myInputView.delegate = self; 
    myInputView.style = kGestureInputStyleFading; 
    myInputView.backgroundColor = [UIColor redColor]; 
}

Thanks in advance!

  • 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-06-08T12:57:50+00:00Added an answer on June 8, 2026 at 12:57 pm

    Don’t worry about autocompletion. Simply define your

    - (void) loadView
    

    method and compile your app… If it does not work, please add some code so that we can see what is happening.

    In loadView you are expected to initialize the view property of your view controller:

    self.view = [[UIView alloc] init...];
    

    In your case:

    -(void)loadView
    {
    CGRect screenRect = [[UIScreen mainScreen] bounds];
    CGFloat screenWidth = screenRect.size.width;
    CGFloat screenHeight = screenRect.size.height;
    
    myInputView = [[GestureInputView alloc] initWithFrame:CGRectMake(0, 0, screenWidth,screenHeight)];
    myInputView.delegate = self; 
    myInputView.style = kGestureInputStyleFading; 
    myInputView.backgroundColor = [UIColor redColor]; 
    
    self.view = myInputView;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a parent class that implements a protocol: @interface GameViewController : UIViewController<GamePrizeDelegate>
I have a UIViewController class MyClass that initially had no XIB, and was initialized
i have a UIViewController class that do the following: detect movement. array a bunch
I have a parent class (A) that is UIViewController. Than i create class B
I have an class, and in the header I define this: @interface MyViewController :
I have a UIViewController that materializes its view in loadView (i.e. no nib). Per
I have a class that implements UIView and inside - (void)drawRect:(CGRect)rect method I add
I have a UIViewController Class Aplha that calls another UIViewController Class Beta in a
I'd like to have a BaseViewController class (that inherits from UIViewController ) for my
I have an Advertisement UIViewController class that contains the following code. The frame is

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.