Closed charlesaroutiounian closed 12 years ago
It crashes when I put the Clock I think that the issue comes from
(void)numberTick:(id)sender { NSDateFormatter formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"HHmmss"]; NSString newClock = [formatter stringFromDate:[NSDate date]];
[_clockTickers enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { if (![[_currentClock substringWithRange:NSMakeRange(idx, 1)] isEqualToString:[newClock substringWithRange:NSMakeRange(idx, 1)]]) { [obj setBackView:[SBTickView tickViewWithTitle:[newClock substringWithRange:NSMakeRange(idx, 1)] fontSize:45.]]; [obj tick:SBTickerViewTickDirectionDown animated:YES completion:nil]; } }];
_currentClock = newClock; }
It's imposible to help you with this information. Try to understand the code instead of just copy&paste it.
It crashes when I put the Clock I think that the issue comes from
(void)numberTick:(id)sender { NSDateFormatter formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"HHmmss"]; NSString newClock = [formatter stringFromDate:[NSDate date]];
[_clockTickers enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { if (![[_currentClock substringWithRange:NSMakeRange(idx, 1)] isEqualToString:[newClock substringWithRange:NSMakeRange(idx, 1)]]) { [obj setBackView:[SBTickView tickViewWithTitle:[newClock substringWithRange:NSMakeRange(idx, 1)] fontSize:45.]]; [obj tick:SBTickerViewTickDirectionDown animated:YES completion:nil]; } }];
_currentClock = newClock; }