• 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
Using non-id sender in IBAction methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using non-id sender in IBAction methods


  • Subject: Using non-id sender in IBAction methods
  • From: Marc Liyanage <email@hidden>
  • Date: Sun, 7 Jun 2009 17:45:09 +0200


With the new dot notation I sometimes use explicit types in my IBAction methods:


- (IBAction)doSomething:(UIButton *)button ...

instead of

- (IBAction)doSomething:(id)sender ...

so I don't have to downcast "sender" to be able to use the dot notation.

Do others do this too? Is this discouraged for some reason?



_______________________________________________

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: Using non-id sender in IBAction methods
      • From: Uli Kusterer <email@hidden>
    • Re: Using non-id sender in IBAction methods
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: NSTask & curl
  • Next by Date: NSOutlineView and tags...
  • Previous by thread: Re: movable / dragable menu symbol
  • Next by thread: Re: Using non-id sender in IBAction methods
  • Index(es):
    • Date
    • Thread