Property Scope (Iphone)

Posted by Hank on Stack Overflow See other posts from Stack Overflow or by Hank
Published on 2010-01-05T11:40:06Z Indexed on 2010/03/12 2:07 UTC
Read the original article Hit count: 220

Filed under:
|
|
|

Hello All. I am having trouble accessing a declared property and I think I am missing something fundamental about the nature of properties and perhaps view controllers. Here's what I'm doing so far:

  • declaring a property "myPhone" in a root view controller called RootViewController.

  • grabbing a phone number from a modally presented people picker

  • setting "myPhone" to the value from the people picker (from within shouldContinueAfterSelectingPerson of ABPeoplePickerNavigationController)

  • trying to access "myPhone" from another modally presented view controller

"myPhone" continues to NSLog to null despite trying every permutation of self.myPhone, super, RootViewController, etc. to try and access the value I set.

What am I missing?

© Stack Overflow or respective owner

Related posts about properties

Related posts about scope