• 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: Model / View best practice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Model / View best practice


  • Subject: Re: Model / View best practice
  • From: Uli Kusterer <email@hidden>
  • Date: Tue, 4 Jul 2006 02:29:24 +0200

Am 03.07.2006 um 18:16 schrieb Kamrin Dahlin:
Would there be a better way to do this -- a better practice? As it stands now, I am hard coding the font, font size and icon size when i create the NSAttributedString, which doesn't allow for much flexability and since I don't really want to put a bunch of code into my model class so that I can change fonts, and fonts size's, scale the icon to my row height, etc, I was hoping someone might be able to suggest a better way to do this?

You'll probably want a view controller or formatter for your data. Just a standalone object that takes a string and an image and turns that into an icon and styled string. This best fits the main point of OOP: It's not here to adhere to some abstract ideal, but rather to provide a clean approach to achieving reusability.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Model / View best practice
      • From: Kam Dahlin <email@hidden>
References: 
 >Model / View best practice (From: "Kamrin Dahlin" <email@hidden>)

  • Prev by Date: Re: Shiny little square buttons
  • Next by Date: Re: How do I move my running app?
  • Previous by thread: Model / View best practice
  • Next by thread: Re: Model / View best practice
  • Index(es):
    • Date
    • Thread