flipView infinite loop bug ?
kohdesmond opened this issue · 4 comments
kohdesmond commented
i will like the value from 99999 to 1, but the flipview have infinite loop.
- (void)viewDidLoad
{
[self performSelector:@selector(changeCreditValue:) withObject:@"1" afterDelay:3];
}
- (void)setupCreditBar
{
//Credit
self.flipView = [[JDFlipNumberView alloc] initWithDigitCount:5];
self.flipView.value = 99999;
self.flipView.maximumValue = 99999;
// add to view hierarchy and resize
[self.view addSubview: self.flipView];
self.flipView.frame = CGRectMake(190,7,90,50);
}
- (void)changeCreditValue:(NSString *)newCreditValue
{
NSDate *startDate = [NSDate date];
NSLog(@"new Credit %@",newCreditValue);
[self.flipView animateToValue:[newCreditValue intValue] duration:3.5];
}
calimarkus commented
What happens exactly?
kohdesmond commented
I'm using ur JDFlipNumberView as a point counter.
The points will decrease or increase. assuming I used 99998 points to buy an item, the value will drop to 1 in a duration of 3.5 sec..... This is when the JDFlipNumberView will keep looping
U can use my code for testing
calimarkus commented
I will have a look on it.
calimarkus commented
I fixed it. A new pod will follow. But you can just checkout master for now.