 |
 |
|
 |
07-03-2009, 01:33 PM
|
#1 (permalink)
|
|
Registered Member
Join Date: Feb 2009
Posts: 39
|
Stopping several buttons from being pressed
Holding down each button in my interface triggers an IBAction event which loops until the button is released.
I don't want other buttons to be able to be pressed while a button is being held down.
So how do I block interface interaction until a button is released?
|
|
|
07-03-2009, 02:51 PM
|
#2 (permalink)
|
|
New Member
Join Date: Jun 2009
Posts: 21
|
Just do something like this on the other buttons:
Code:
myButton.enabled = NO;
|
|
|
07-03-2009, 05:03 PM
|
#3 (permalink)
|
|
Registered Member
Join Date: Jun 2009
Location: currently AZ
Posts: 108
|
or could have a variable BOOL buttonPressed
set it to yes when a button is pressed and before all the buttons are used have
if (!buttonPressed)
and when you have finished with the button just set it to no;
|
|
|
07-03-2009, 05:56 PM
|
#4 (permalink)
|
|
New Member
Join Date: Jun 2009
Posts: 21
|
Wouldn't that kill his loop though? Because that would apply to every button he has...so his loop wouldn't...loop. At the beginning it would be okay, maybe for the first iteration, but the second one would never happen.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 550 |
| 46 members and 504 guests |
| 9livesoftware, AdyCoder, al31, Alexman, bartender, blackoutq3, BrianSlick, ChristyS, CoolApps, coolman, coulls, dbarrett, dennisnederlof, DenVog, designomatt, dljeffery, DorkyMohr, dsailer, ethanwa, fabiolpi, ggalante, hyang, iphonedevelopment@me, issya, javaconvert, jixu2002cn, josechuis, jschorn, marciokoko, MiniRobinho, mlo, Mopedhead, m_kaminsky@yahoo.com, P2k, pablo.roqueta, popclock, ryguy2503, seriessix, SmallWonder, Stephane.tamis, supudo, themathminister, TunaNugget, ZunePod |
| Most users ever online was 779, 05-11-2009 at 10:55 AM. |
» Stats |
Members: 21,491
Threads: 35,773
Posts: 156,705
Top Poster: smasher (2,448)
|
| Welcome to our newest member, DorkyMohr |
|