Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-15-2009, 05:04 AM   #1 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 20
S1m0n18 is on a distinguished road
Default 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
S1m0n18 is offline   Reply With Quote
Old 08-15-2009, 05:08 AM   #2 (permalink)
iPhone Developer
 
kohjingyu's Avatar
 
Join Date: May 2009
Location: Singapore
Posts: 326
kohjingyu is on a distinguished road
Default

Quote:
Originally Posted by S1m0n18 View Post
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.
__________________
Bacteria Bash
Cheese Collect
Jokestar
Follow me on Twitter for news about my apps:
(Website|Twitter)
kohjingyu is offline   Reply With Quote
Old 08-15-2009, 05:10 AM   #3 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 20
S1m0n18 is on a distinguished road
Default

Quote:
Originally Posted by kohjingyu View Post
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?
S1m0n18 is offline   Reply With Quote
Old 08-15-2009, 05:29 AM   #4 (permalink)
iPhone Developer
 
kohjingyu's Avatar
 
Join Date: May 2009
Location: Singapore
Posts: 326
kohjingyu is on a distinguished road
Default

Quote:
Originally Posted by S1m0n18 View Post
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:

Code:
- (void)hideLabel;
and in the .m file, do this:

Code:
- (void)hideLabel
{
      myLabel.hidden = YES;
}
and repeat for the showTimer function.

Hope that helps.
__________________
Bacteria Bash
Cheese Collect
Jokestar
Follow me on Twitter for news about my apps:
(Website|Twitter)
kohjingyu is offline   Reply With Quote
Old 08-15-2009, 05:59 AM   #5 (permalink)
Registered Member
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,050
wuf810 is on a distinguished road
Default

Quote:
Originally Posted by S1m0n18 View Post
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.
wuf810 is offline   Reply With Quote
Old 08-15-2009, 06:02 AM   #6 (permalink)
iPhone Developer
 
kohjingyu's Avatar
 
Join Date: May 2009
Location: Singapore
Posts: 326
kohjingyu is on a distinguished road
Default

Quote:
Originally Posted by wuf810 View Post
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.
__________________
Bacteria Bash
Cheese Collect
Jokestar
Follow me on Twitter for news about my apps:
(Website|Twitter)
kohjingyu is offline   Reply With Quote
Old 08-15-2009, 11:04 AM   #7 (permalink)
Registered Member
 
Join Date: Jul 2009
Posts: 20
S1m0n18 is on a distinguished road
Default

Quote:
Originally Posted by wuf810 View Post
forget timers, just use and animation.
How could I animate that?
S1m0n18 is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, blink, label, uilabel

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» 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
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:24 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0