-(IBAction)btnDate_Clicked:(id)sender
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
yourScrollView.frame = CGRectMake(0, -100, 320, yourScrollView.frame.size.height); // set frame which you want
[UIView commitAnimations];
}
하고 다시 다음 스크롤의 원래 위치를 설정 전 내 애니메이션 코드로있는 ScrollView 프레임을 설정하려는 경우.
-(IBAction)btnDone_Clicked:(id)sender
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
yourScrollView.frame = CGRectMake(0, 0, 320, yourScrollView.frame.size.height); // set frame which you want
[UIView commitAnimations];
}
UIScrollView
의scrollRectToVisible:animated:
방법은 내 대답을 CHK http://stackoverflow.com/questions/13620898/how-to-set-the-textview-move-up-animation-based-on -keyboard-in-the-custom-uiview/13621478 # 13621478 – Rajneesh071답변은 나름의 질문입니다. keyBoard 알림 콜백에서 수행하는 대신 버튼의 액션 메소드에서 스크롤 뷰의 contentOffset을 설정해야합니다 (참조한 Apple 문서에서와 같이) – Atif