app crash when i did animation.
Closed this issue · 0 comments
vikrant-Ios commented
@jonathantribouharet
when i did animation on event day on this method
-(void)calendar:(JTCalendarManager *)calendar prepareDayView:(JTCalendarDayView *)dayView
I did animation using dispatch_queue
`
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
dayView.circleView.backgroundColor = [UIColor colorWithRed: (CGFloat)0/255 green: (CGFloat)163/255 blue: (CGFloat)227/255 alpha: 0.3];
dayView.circleView.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.0001, 0.0001);
sleep(1);
dispatch_async(dispatch_get_main_queue(), ^(void){
[UIView transitionWithView:dayView
duration:.1
options:UIViewAnimationOptionCurveEaseIn
animations:^{
[calendarManager reload];
dayView.circleView.backgroundColor = [UIColor colorWithRed: (CGFloat)0/255 green: (CGFloat)163/255 blue: (CGFloat)227/255 alpha: 0.6];
dayView.circleView.transform = CGAffineTransformIdentity;
} completion:^(BOOL Finished){
dayView.circleView.backgroundColor = [UIColor colorWithRed: (CGFloat)0/255 green: (CGFloat)163/255 blue: (CGFloat)227/255 alpha: 1];
}];
});
});
dayView.circleView.hidden = NO;
//dayView.circleView.backgroundColor = skyBlueColour;
dayView.dotView.backgroundColor = [UIColor whiteColor];
dayView.textLabel.textColor = [UIColor whiteColor];
dayView.textLabel.font = [UIFont fontWithName:@"BentonSans-Medium" size:14.0];`
Please help how to do animation on event day