
Untitled
By: a guest on
Jul 15th, 2012 | syntax:
None | size: 0.82 KB | hits: 20 | expires: Never
Why is my view rotating 90 degrees prior to it scaling?
- (void)buttonTapped:(UIButton *) sender
{
NSInteger index = [self.carousel indexOfItemView:sender];
UIView *currentView = [self.carousel itemViewAtIndex: index];
UIView *proxyView = [[UIView alloc] initWithFrame:currentView.frame];
proxyView.hidden = YES;
proxyView.autoresizingMask = currentView.autoresizingMask;
[currentView.superview addSubview: proxyView];
CGRect frame = [currentView.window convertRect:currentView.frame fromView:proxyView.superview];
[currentView.window addSubview:currentView];
currentView.frame = frame;
[UIView
animateWithDuration:2.4
animations:^{
currentView.frame = currentView.window.bounds;
}];
currentView.frame = frame;
currentView.frame = currentView.window.bounds;