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

The Archive Base Latest Questions

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

I am just trying to write my very first code in Objective C. I

  • 0

I am just trying to write my very first code in Objective C.

I have created a new project in XCode and added the following lines of code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    UILabel *myMessage;
    myMessage=[[UILabel alloc] initWithFrame:CGRectMake(190, 300, 500, 75)];
    myMessage.text=@"Hello World!";
    myMessage.font=[UIFont systemFontOfSize:72];
    [window addSubView:myMessage];
    [myMessage release];

    [window makeKeyAndVisible];

    return YES;
}

However, I got the following warning (on line [window addSubView:myMessage]):

warning: ‘UIWindow’ may not respond to ‘-addSubView:’

And when I launch the application, it just terminates.

Though I just copied the code from the book “Sams Teach Yourself iPad Development”, and it seems that it should show a message on the screen.

Any help would be appreciated.

Thank you.

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

    get rid of the capital V. it should be

    [window addSubview:myMessage];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey i'm just trying to write some code in DrScheme: ((function (x) (* x
I'm trying to write (or just find an existing) PHP method that can take
I'm trying to write a simple program in VC++ which will just initialize the
I'm just starting out writing trying to write a simple program in C and
I'm trying to write a web application using SpringMVC. Normally I'd just map some
Please bear with me, I'm just learning C++. I'm trying to write my header
(Edit: randrange is just random.randrange, I didn't write my own RNG) I'm trying to
I am very new to XSLT, and the first thing that i need to
I am trying to write a program to check that some C source code
We have a database of loyalty card holders. I'm trying to write a simple

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.