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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 09-18-2009, 07:20 PM   #1 (permalink)
eggapps
Registered Member
 
Join Date: Sep 2009
Posts: 13
Default Tutorial with progressView - Troubles

Hi there, I am new on board. I have a little little problem. I succeeded in creating the application as they did it the tutorial but now my app seems to have a problem with linking the things...

/Location/Classes/../MainView.m:16: warning: 'NSTimer' may not respond to '+scheduledTimerWithTimeInterval::target:selector: userInfo:repeats:'

MY ENTIRE CODE IN Main.m looks like that

----------------------------------------

#import "MainView.h"

@implementation MainView

@synthesize timer;

- (IBAction)startLoadingBlue {
progressView.progress = 0.0;
progressLabel.text = @"Color Loading";
timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateProgressBlue) userInfo:nil repeats:YES];
}

- (IBAction)startLoadingRed {
progressView.progress = 0.0;
progressLabel.text = @"Color Loading";
timer = [NSTimer scheduledTimerWithTimeInterval:1:0 target:self selector:@selector(updateProgressRed) userInfo:nil repeats:YES];

}

-(void)updateProgressBlue {
progressView.progress = progressView.progress + 0.1;
if (progressView.progress == 0.5) {
progressLabel.text = @"Applying colour";
[self applyColourBlue];
}

if (progressView.progress == 1.0) {
progressLabel.text = @"Colour Applied";
[timer invalidate];
}

}

-(void)updateProgressRed {
progressView.progress = progressView.progress + 0.1;
if (progressView.progress == 0.5) {
progressLabel.text = @"Applying colour";
[self applyColourRed];
}

if (progressView.progress == 1.0) {
progressLabel.text = @"Colour Applied";
[timer invalidate];
}

}

-(void)applyColourRed {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:5.0];
self.backgroundColor = [UIColor redColor];
[UIView commitAnimations];
}

-(void)applyColourBlue{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:5.0];
self.backgroundColor = [UIColor blueColor];
[UIView commitAnimations];

}

@end
---------------------------

Need help. thx
eggapps is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,864
Threads: 89,223
Posts: 380,688
Top Poster: BrianSlick (7,129)
Welcome to our newest member, elliotbrady
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:51 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.