我在这里遇到了一些问题。对于我的应用程序,我有我的主要观点,针对不同的窗口。我已经把它们放在视线范围内,当它们被需要的时候,它们被动态地移动到视图中,直到我决定创建一个文本域时,我从来没有遇到过这个问题。当我点击按钮来显示视图时,它会出现,但是当我单击文本框来键入并且键盘加载视图消失时,但是如果我单击按钮以使视图返回,文本框将被输入并准备就绪输入。任何人都有解决办法我附上了视图出现方式下面的代码。iOS键盘制作视图消失
感谢,
CurtisB
- (IBAction)login:(id)sender {
sidebutton = @"0";
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.0];
[self.blackhide setFrame:CGRectMake(self.blackhide.frame.origin.x -750, self.blackhide.frame.origin.y, self.blackhide.frame.size.width, self.blackhide.frame.size.height)];
[UIView setAnimationDuration:0.5];
[self.button2 setFrame:CGRectMake(self.button2.frame.origin.x - 300, self.button2.frame.origin.y, self.button2.frame.size.width, self.button2.frame.size.height)];
[self.mainview setFrame:CGRectMake(self.mainview.frame.origin.x - 300, self.mainview.frame.origin.y, self.mainview.frame.size.width, self.mainview.frame.size.height)];
[self.sidebarview setFrame:CGRectMake(self.sidebarview.frame.origin.x - 376, self.sidebarview.frame.origin.y, self.sidebarview.frame.size.width, self.sidebarview.frame.size.height)];
[UIView setAnimationDuration:0.0];
[self.loginview setFrame:CGRectMake(self.loginview.frame.origin.x + 376, self.loginview.frame.origin.y, self.loginview.frame.size.width, self.loginview.frame.size.height)];
}
多放些代码,即您使用文本框 – NSPratik
块做什么。根据。动画。以来。 iOS4的。请。谢谢。您。 – holex