• 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: UIButton's Sender Control Events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIButton's Sender Control Events


  • Subject: Re: UIButton's Sender Control Events
  • From: Graham Cox <email@hidden>
  • Date: Mon, 25 Jan 2010 09:06:15 +1100

On 25/01/2010, at 5:27 AM, Chunk 1978 wrote:

> refactoring code so one method for the same button can handle a small
> if/else statement could easily be considered more ideal than having
> two separate methods.


No, not really. This is object-oriented programming, having separate methods is effectively just moving the if/else (or switch) back into the runtime. There's little need to also do it yourself.

--Graham

_______________________________________________

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: UIButton's Sender Control Events
      • From: Chunk 1978 <email@hidden>
References: 
 >UIButton's Sender Control Events (From: Chunk 1978 <email@hidden>)
 >Re: UIButton's Sender Control Events (From: Chunk 1978 <email@hidden>)
 >Re: UIButton's Sender Control Events (From: Alexander Spohr <email@hidden>)
 >Re: UIButton's Sender Control Events (From: Chunk 1978 <email@hidden>)

  • Prev by Date: Re: Allow only root/admin users to execute the cocoa app
  • Next by Date: NSURL crash
  • Previous by thread: Re: UIButton's Sender Control Events
  • Next by thread: Re: UIButton's Sender Control Events
  • Index(es):
    • Date
    • Thread