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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:39:54+00:00 2026-05-13T18:39:54+00:00

I have done one iPhone app in Objective-C. When I want to link a

  • 0

I have done one iPhone app in Objective-C. When I want to link a Label to some data in that I would declare it like this:

@interface CityDetailViewController : UIViewController {
UILabel *cityName;
}

@property(nonatomic, retain) IBOutlet UILabel *cityName;

And then when the CityDetailViewController object is created in code I would set the city name like this [self.cityView.cityName setText:city.name];

I can’t, for the life of me, figure out how to do this in MonoTouch.
I tried manually creating the Outlets through Interface Builder and I tried adding this code that I found in the .designer.cs file from another project:

[MonoTouch.Foundation.Connect("headlineLabel")]
    private MonoTouch.UIKit.UILabel headlineLabel {
        get {
            return ((MonoTouch.UIKit.UILabel)(this.GetNativeField("headlineLabel")));
        }
        set {
            this.SetNativeField("headlineLabel", value);
        }
    }

And I’ve tried a combination of both of those things.
They don’t work.
The closest I can get is to actually apply the Outlet using Interface Builder, but when my View is declared I get this error:

this class is not key value coding-compliant for the key headlineLabel.

So I’m completely at a loss.
Can someone explain this to me please?

  • 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-13T18:39:55+00:00Added an answer on May 13, 2026 at 6:39 pm

    Pretty sure that I’ve figured it out so I’ll post the process here for others to look at:

    Step 1) Start with your empty View like this:
    step 1
    (source: jamespwright.com)

    Step 2) Add a UILabel Control to your View:
    step 2
    (source: jamespwright.com)

    Step 3) Select “File’s Owner”:
    step 3
    (source: jamespwright.com)

    Step 4) Select the Identity Inspector (CMD + 4) and add a new Class Outlet:
    step 4
    (source: jamespwright.com)

    Step 5) Select the Connections Inspector (CMD + 2) and you should see your new Class Outlet there:
    step 5
    (source: jamespwright.com)

    Step 6) Drag the connection to your Label on your View.

    Step 7) Inside your code you populate it by typing myLabel.Text = "My Label!"

    Hopefully that will help someone else out in the future.

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

Sidebar

Related Questions

I have done one app in iphone sdk 3.0 in that i use some
Everybody.. I have create one universal application.. My app worked fine to only two
I am having some issues with my status bar. This is an iPhone app,
I have to change the name of my app. I've done the following (Xcode
I am starting to develop apps for iPhone. There is 1 specific app that
i'm currently developing an app for both Android and iOS, thing is... I started
I am a relative novice who is teaching himself Objective-C on Xcode to develop
I've spent the whole day creating a system between my Mac and iPhone where
I'm currently trying to set up my entity by filling in the required attributes.
I see there is a lot of similar questions but passing through them not

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.