我正在學Objective-C作爲初學者,我有點迷失了setFrame,爲什麼動畫需要一個setFrame,它在這裏真的做了什麼?有人能解釋一下嗎?感謝您的任何建議。Objective C動畫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];
謝謝,我現在得到了:) – Bruce