On Aug 21, 2009, at 6:39 AM, Eric E. Dolecki wrote:

When I trace out the class, it is indeed the app delegate and NOT the firstViewController. That's pretty strange. I was expecting to get at the actual FirstViewController class.

What made you think that [[UIApplication sharedApplication] delegate]; would return a view controller rather than the app delegate? If you need a reference to this view controller perhaps it would be a good idea to declare a firstViewController property in your appDelegate and then you could do something like this:

[[UIApplication sharedApplication] delegate].firstViewController.availableNetwork;

While on that note, it's a actually probably even better of an idea to have the availableNetwork property exist in your appDelegate, since this is sort of generic application state property - it's not inherently the property of an individual view controller. So, then you'd end up with:

[[UIApplication sharedApplication] delegate].availableNetwork;

Luke
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to