당신은 탐색 스택에의 ViewController를 밀어 동안이 같은 뭔가를 시도 할 수 있습니다 :
SecondViewController *VC2 = [[SecondViewController alloc]init];
VC2.nameSupplied = self.nameField.text;
CGPoint mycenter = VC2.view.center;
CGPoint navCenter = self.navigationController.navigationBar.center;
VC2.view.center = CGPointMake(mycenter.x , mycenter.y - VC2.view.frame.size.height);
self.navigationController.navigationBar.center = CGPointMake(navCenter.x, navCenter.y - self.navigationController.navigationBar.frame.size.height);
[self.navigationController pushViewController:VC2 animated:NO];
[UIView animateWithDuration:0.5
delay:0
options: UIViewAnimationCurveEaseOut
animations:^{
VC2.view.center = mycenter;
self.navigationController.navigationBar.center = navCenter;
}
completion:^(BOOL finished){
NSLog(@"Animation Done!");
}];
을하지만 당신은 단지 동일한 뷰 컨트롤러에서 다른 뷰 (위에서 아래로 이동)를 표시 할 경우, 내가있어 .....
self.secondView.transform = CGAffineTransformMakeTranslation(0, secondView.frame.size.height);
덕분에 많은 :이 같이있는 UIView의 tranform 속성을 사용할 수 있습니다 t .... – user1523344
@ user1523344 : 도움이 되었다면 답을 받아 들여야합니다. –