• 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: Alexander Spohr <email@hidden>
  • Date: Mon, 25 Jan 2010 09:19:38 +0100

Please send code that would work. All broken examples are clearly not code you can use and therefore very bad examples for what you are trying to achieve.

Am 25.01.2010 um 00:22 schrieb Chunk 1978:

> i wanted to simplify the code (one button per method) by using the
> buttons UIControlEvents of touchDown and touchUpInside/touchUpOutside

Please explain that.
touchDown + touchUpInside  => lightOn?
touchDown + touchUpOutside => lightOff?
or what?

> and produce:
>
> - (IBAction)toggleLight
> {
> //toggle light
> }

What is wrong with Graham's example?

> - (IBAction) toggleSomething:(id) sender
> {
>    [self setState:![self state]];
> }

That's exactly how you implement a toggle action.

> i meant it's clear that it's not possible with UIControlEvents... or
> at least not simply so.

What is the second "it's" here if Graham's example is wrong?

	atze

_______________________________________________

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

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

  • Prev by Date: Re: Frame/layout rect
  • Next by Date: Re: Re: Application is not available in the launched applications list.
  • Previous by thread: Re: UIButton's Sender Control Events
  • Next by thread: Coding double modifier global hotkeys?
  • Index(es):
    • Date
    • Thread