Q:

Objective C Animation setFrame

I am learning objective-c as a beginner and i am a bit lost over the setFrame, why animation required to have a setFrame, what does it really do in here? Could someone please explain? Thanks for any suggestions. 
Thanks
-(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];

A:

why animation required to have a setFrame, what does it really do in here?

You certainly don't need an animation to set the frame of a view, but setting the frame inside an animation will cause the change to be animated. That is, instead of moving _viewAccordionMenu to its new position immediately, setting the frame in an animation will cause the view to move over ANIMATION_DURATION seconds. This often looks nicer than having a view jump from one place to another.

