Re: performance of UIControls
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