简体   繁体   中英

How can i move the screen up when we touch on text field?

当我触摸文本字段时,如何向上移动(滚动)屏幕,它应该在ios3和ios4上都可以工作(我正在使用xcode 4开发该应用程序)?

链接将为您提供所有必需的答案...我建议您仔细阅读...

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
// (x,y, width, height) change it as you want   
[yourViewName setFrame:CGRectMake(0.0f, 200.0f, 320.0f, 460.0f)];
[UIView commitAnimations];

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM