• 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
Re: performance of UIControls
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performance of UIControls


  • Subject: Re: performance of UIControls
  • From: Michael Ash <email@hidden>
  • Date: Thu, 19 Feb 2009 22:30:33 -0500

On Thu, Feb 19, 2009 at 4:25 PM, Memo Akten <email@hidden> wrote:
> but I was wondering if I could just directly use the controls in my update
> loop? I would only use them once per update loop (for loops etc. I would
> cache the value first if need be). E.g. if (mySwitch.on) or velocity =
> velSlider.value? Or will this be slow? Is there a preferred method for these
> situations?

Forget about performance: this is terrible design. Read up about MVC:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html

Your model should not be talking directly to your view. Instead, your
controller should set properties on the model when the UI changes, and
then the model can use its own properties directly.

Mike
_______________________________________________

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: performance of UIControls
      • From: Memo Akten <email@hidden>
References: 
 >performance of UIControls (From: Memo Akten <email@hidden>)

  • Prev by Date: Re: More on Undo and Redo
  • Next by Date: Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation
  • Previous by thread: performance of UIControls
  • Next by thread: Re: performance of UIControls
  • Index(es):
    • Date
    • Thread