使用块的示例.这将隐藏iPad屏幕顶部的工具栏.
[UIView animateWithDuration:.7 animations:^(void) { CGRect toolbarFrame = self.toolbar.frame; toolbarFrame.origin.y = -44; // moves iPad Toolbar off screen self.toolbar.frame = toolbarFrame; } completion:^(BOOL finished) { self.toolbar.hidden = YES; }];