SSStackedPageView icon indicating copy to clipboard operation
SSStackedPageView copied to clipboard

layer transform bug

Open mjspawn opened this issue 10 years ago • 0 comments

[UIView beginAnimations:@"stackScrolling" context:nil]; [UIView setAnimationDuration:.4f]; page.layer.transform = CATransform3DMakeScale(MINIMUM_SCALE,MINIMUM_SCALE, 1.f); NSLog(@"page layer orgin x is %f", page.layer.frame.origin.x); [UIView commitAnimations];

some layer not in correct frame

2014-04-24 17:41:25.830 SSStackView[1023:70b] page layer orgin x is 16.000004 2014-04-24 17:41:25.831 SSStackView[1023:70b] page layer orgin x is 16.000004 2014-04-24 17:41:25.831 SSStackView[1023:70b] page layer orgin x is -0.000003 2014-04-24 17:41:25.831 SSStackView[1023:70b] page layer orgin x is 16.000004

When Fast scroll back and forth startIndex page did not transform correctly. maybe scroll delegate did not responds timely. I fix at setPageAtIndex:

page.frame = CGRectMake((CGRectGetWidth(self.bounds) * (1.0-MINIMUM_SCALE)) / 2, index * PAGE_PEAK, CGRectGetWidth(self.bounds) * MINIMUM_SCALE, CGRectGetHeight(self.bounds));

and cancel transform at resetPages, reloadVisiblePages //page.layer.transform = CATransform3DMakeScale(MINIMUM_SCALE, MINIMUM_SCALE, 1.f);

this way may not pretty good, I think u have another one.

mjspawn avatar Apr 24 '14 09:04 mjspawn