Hallo, ich habe leider ein Kleines Problem
vl. kann mir da jemand helfen
Danke
...........................................................................................................................
@implementation ViewController
-(void) TimerRun {
secondsCount = secondsCount -1;
int minuts = secondsCount / 60;
int seconds = secondsCount - (minuts *60);
NSString *timerOutput = [NSString stringWithFormat:@"%2d:%.2d", minuts, seconds];
countdownLabel.text = timerOutput;
if (secondsCount == 0){
[countdownTimer invalidate];
countdownTimer = nil;
}
}
-(void) setTimer {
countdownTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerRun) userInfo:nil repeats:YES];
secondsCount = 180;
}
- (void)viewDidLoad{
[super viewDidLoad];
[self setTimer];
.............................................................................................
ich bekomme immer das:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
was mache ich da falsch?
MFG
Mr.Pink
vl. kann mir da jemand helfen
Danke
...........................................................................................................................
@implementation ViewController
-(void) TimerRun {
secondsCount = secondsCount -1;
int minuts = secondsCount / 60;
int seconds = secondsCount - (minuts *60);
NSString *timerOutput = [NSString stringWithFormat:@"%2d:%.2d", minuts, seconds];
countdownLabel.text = timerOutput;
if (secondsCount == 0){
[countdownTimer invalidate];
countdownTimer = nil;
}
}
-(void) setTimer {
countdownTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerRun) userInfo:nil repeats:YES];
secondsCount = 180;
}
- (void)viewDidLoad{
[super viewDidLoad];
[self setTimer];
.............................................................................................
ich bekomme immer das:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
was mache ich da falsch?
MFG
Mr.Pink
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Mr.Pink ()