AUIScrollView
包含 5UIView
秒。基本上我想展开和折叠它们,当用户触摸任何一个UIView
.
动画globalPressReleasesView
展开代码:
[UIView beginAnimations:@"Expand" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationDelegate:self];
[globalPressReleasesView setFrame:CGRectMake(globalPressReleasesView.frame.origin.x, globalPressReleasesView.frame.origin.y, globalPressReleasesView.frame.size.width, globalPressReleasesView.frame.size.height + [globalPressReleasesArray count]*105)];
[financialPressReleasesView setFrame:CGRectMake(financialPressReleasesView.frame.origin.x, financialPressReleasesView.frame.origin.y + [globalPressReleasesArray count]*105, financialPressReleasesView.frame.size.width, financialPressReleasesView.frame.size.height)];
[newOnCscView setFrame:CGRectMake(newOnCscView.frame.origin.x, newOnCscView.frame.origin.y + [globalPressReleasesArray count]*105, newOnCscView.frame.size.width, newOnCscView.frame.size.height)];
[latestEventsView setFrame:CGRectMake(latestEventsView.frame.origin.x, latestEventsView.frame.origin.y + [globalPressReleasesArray count]*105, latestEventsView.frame.size.width, latestEventsView.frame.size.height)];
[latestCaseStudiesView setFrame:CGRectMake(latestCaseStudiesView.frame.origin.x, latestCaseStudiesView.frame.origin.y + [globalPressReleasesArray count]*105, latestCaseStudiesView.frame.size.width, latestCaseStudiesView.frame.size.height)];
[scrollView setContentSize:CGSizeMake(scrollView.frame.size.width, scrollView.frame.size.height + [globalPressReleasesArray count]*105)];
[UIView commitAnimations];
其他xib属性:
每个UIView
剪辑
scrollview.autoresize = YES
问题:
'globalPressReleasesView' 完美扩展,但是当我滚动我的scrollview
. globalPressReleasesView
frame 将自身重置为 xib 中定义的原始帧值。
有人能猜出问题是什么吗?