I'm trying to display an array of numbers in a UILabel using a timer,and show them in the order set in the array, but I only receive the Title in the format and then a SIGABRT ! any suggestions...Thanks
Part of the code with problems!
-(IBAction) rotate3
{
NSString *number = [dayArray initWithArray:(NSArray *)dayArray];
NSArray *array = [[NSArray alloc] initWithObjects: @"0", @"1", @"2", @"3", @"4", @"5" ,@"6", @"7", @"8",@"9",@"10",@"11",@"12",@"13", @"14", @"15", @"16", @"17", @"18", @"19",nil];
numberCount++;
timer=[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(rotate3 )userInfo:nil repeats:YES];
self.dayArray = array;
[array release];
label.text = [[NSString alloc] initWithFormat:@"Day %@ " number];
}
Your SIGABRT is probably due to stack corruption: NSTimer can only be used with selectors of the form:
but you're trying to use it with
which doesn't take enough arguments.
It is very strange string :
[dayArray initWithArray:(NSArray *)dayArray];
. Try this: