Re: performance of UIControls
Re: performance of UIControls
- Subject: Re: performance of UIControls
- From: Michael Ash <email@hidden>
- Date: Fri, 20 Feb 2009 10:06:32 -0500
On Fri, Feb 20, 2009 at 7:03 AM, Memo Akten <email@hidden> wrote:
> Yea that is exactly how I have it currently as I described in my mail. But
> to maintain that has unnecessarily extra steps. My Controller extends my own
> custom controller class (which extends UIViewController) which adds the
> common functionality I require to the types of apps I'm building. But there
> is no way my view (which contains x amount of sliders, labels, and switches
> specific to the application laid out manually the way I want them to look)
> and model (parameters very specific to this application) are reusable. Which
> is why my question was about the performance of reading from the controls
> directly.
MVC is not just about reusability. It's a good pattern to follow for
many reasons, including plain old cleaner code, more flexibility, and
making your code easier to write and easier to change.
Your drive to simplify your code is actually a drive to complicate it.
It is simpler and easier to have model properties that get modified by
the UI than it is to make the model query the UI every time it needs
those properties. So as I said before, the performance of this doesn't
matter because you shouldn't be doing it anyway.
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