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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:00:21+00:00 2026-06-09T10:00:21+00:00

Some background: I wrote a UIScrollView derived class with an outlet named contentView, similar

  • 0

Some background:

I wrote a UIScrollView derived class with an outlet named contentView, similar to the following:

@interface MyScrollView : UIScrollView {
    IBOutlet UIView * contentView;
}

...

@end

My outlet, in this case is an iVar, not a property. I made use of my class in Interface builder and connected a view to the contentView outlet. At runtime, however, I discovered that my iVar was still nil and was not set to the desired view object.

Some experimentation revealed that if I renamed the outlet or made my outlet a property instead of an iVar, all would work fine. Further research showed that with my outlet as an iVar named contentView, loading the nib would actually connect my desired view object to a private iVar in UIScrollView named _contentView.

I know that nib loading uses KVC to set values and that the KVC setValue:forKey: method will set a value using any of the following:

  • set{Key}: method
  • {key} iVar
  • _{key} iVar

I suspect, but cannot prove, that an attempt to find the set{Key}: method occurs first, and if that fails, an enumeration of iVars is undertaken to find the {key} or _{key} iVar next. This enumeration probably occurs in an order that processes iVars from superclasses before subclasses.

Is there a documented order in which the above candidates are attempted? In what order are members of superclasses attempted in relation to subclasses?

  • 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-09T10:00:23+00:00Added an answer on June 9, 2026 at 10:00 am

    The specific search algorithm is documented in the Key-Value Coding Programming Guide.

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

Sidebar

Related Questions

http://grab.by/1rI8 I wrote some jQuery script so that the background image will always scale
I wrote the following code of centered background image based on a example that
I wrote a theme for Google+. It injects CSS/Javascript to replace some colors, background
I just wrote a Background class for a new project. The background is basically
I wrote some JQuery code in an .js.coffee file and I get the following
I wrote some codes in viewWillAppear in order to change the background image of
Some background info: I am currently writing a bootloader in protected mode while learning
Some background info: I'm trying to run a server program in python 2.5.1 (the
Some background: an 'image' is part of one 'photoshoot', and may be a part
Some background I'm currently building a predominantly classic web app (rather than a single

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.