• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Calling method in brand new view to set a variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling method in brand new view to set a variable?


  • Subject: Calling method in brand new view to set a variable?
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Wed, 21 Oct 2009 00:39:03 -0400

I am calling up a view from it's nib, and immediately calling a method in
that view controller class to set a variable. I can't access the newly set
variable in viewDidLoad, so I have a timer of 100ms inside the viewDidLoad
that actually uses the variable that is set (it's available by then).
Is there a better way (callback method) that I should use instead that would
be foolproof and not based on a NSTimer being long enough to properly
access? Or should I store the variable in my model class and just use a
getter at that point instead? It's a little easier to keep it in the view
using it, but if that's the way to do it, so be it.

Thanks,
Eric
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Calling method in brand new view to set a variable?
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Questions about Nib Object Retention
  • Next by Date: Magic Mouse and NSTouch
  • Previous by thread: Applying a Core Image filter to a PDFView, WebView or any view
  • Next by thread: Re: Calling method in brand new view to set a variable?
  • Index(es):
    • Date
    • Thread