我作为初学者正在学习objective-c,我对setFrame有点迷茫,为什么动画需要有一个 setFrame,它在这里真正做了什么?有人可以解释一下吗?感谢您的任何建议。
谢谢
-(void)showAccordionMenuInView:(UIView *)targetView{
...
// STEP 5: ANIMATE
[UIView beginAnimations:@"" context:nil];
[UIView setAnimationDuration:ANIMATION_DURATION];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[self.view setAlpha:0.5];
// Set the yPoint value as the y origin point of the menu view
// and the tempMenuHeight value as its height.
**[_viewAccordionMenu setFrame:CGRectMake(_viewAccordionMenu.frame.origin.x,
yPoint,
_viewAccordionMenu.frame.size.width,
tempMenuHeight)];**
[UIView commitAnimations];