 |
 |
|
 |
08-15-2009, 05:04 AM
|
#1 (permalink)
|
|
Registered Member
Join Date: Jul 2009
Posts: 20
|
Let Label blink
How can I make, that when I click my button, the Label starts to blink? E.g. to make an "S.O.S-Label" that blinks in the S.O.S-Rhythm..
Thx in advance
|
|
|
08-15-2009, 05:08 AM
|
#2 (permalink)
|
|
iPhone Developer
Join Date: May 2009
Location: Singapore
Posts: 326
|
Quote:
Originally Posted by S1m0n18
How can I make, that when I click my button, the Label starts to blink? E.g. to make an "S.O.S-Label" that blinks in the S.O.S-Rhythm..
Thx in advance
|
Create 2 timers, and set one to say interval 1.0. Set the other one to interval 2.0.
Make the function that the first timer calls hide the label. You can do this by:
Code:
myLabel.hidden = YES;
Make the second timer call a function then stops hiding the label.
Code:
myLabel.hidden = NO;
Hope that helps.
|
|
|
08-15-2009, 05:10 AM
|
#3 (permalink)
|
|
Registered Member
Join Date: Jul 2009
Posts: 20
|
Quote:
Originally Posted by kohjingyu
Create 2 timers, and set one to say interval 1.0. Set the other one to interval 2.0.
Make the function that the first timer calls hide the label. You can do this by:
Code:
myLabel.hidden = YES;
Make the second timer call a function then stops hiding the label.
Code:
myLabel.hidden = NO;
Hope that helps. 
|
Stupid question, but how can I make a timer?
|
|
|
08-15-2009, 05:29 AM
|
#4 (permalink)
|
|
iPhone Developer
Join Date: May 2009
Location: Singapore
Posts: 326
|
Quote:
Originally Posted by S1m0n18
Stupid question, but how can I make a timer?
|
Code:
NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(hideLabel) userInfo:nil repeats:YES];
Then declare your function in the .h file:
and in the .m file, do this:
Code:
- (void)hideLabel
{
myLabel.hidden = YES;
}
and repeat for the showTimer function.
Hope that helps.
|
|
|
08-15-2009, 05:59 AM
|
#5 (permalink)
|
|
Registered Member
Join Date: Sep 2008
Location: London, UK
Posts: 1,050
|
Quote:
Originally Posted by S1m0n18
How can I make, that when I click my button, the Label starts to blink? E.g. to make an "S.O.S-Label" that blinks in the S.O.S-Rhythm..
Thx in advance
|
forget timers, just use and animation.
|
|
|
08-15-2009, 06:02 AM
|
#6 (permalink)
|
|
iPhone Developer
Join Date: May 2009
Location: Singapore
Posts: 326
|
Quote:
Originally Posted by wuf810
forget timers, just use and animation.
|
Hmm, I'm pretty sure if you want the label to actually blink you still have to use a timer.
|
|
|
08-15-2009, 11:04 AM
|
#7 (permalink)
|
|
Registered Member
Join Date: Jul 2009
Posts: 20
|
Quote:
Originally Posted by wuf810
forget timers, just use and animation.
|
How could I animate that?
|
|
|
 |
| 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: 315 |
| 12 members and 303 guests |
| chiataytuday, coolman, givensur, glenn_sayers, guusleijsten, jbro, mediaspree, mottdog, mtl_tech_guy, Punkjumper, vilisei, whitey99 |
| Most users ever online was 1,387, 04-10-2012 at 04:21 AM. |
» Stats |
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
|
| Welcome to our newest member, Anwerbl |
|