當鍵盤擋住輸入時
方法一 移動畫面
- (void) textFieldDidBeginEditing:(UITextField *)textField{ [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.25]; [self.view setFrame:CGRectMake(0, correctY, self.view.frame.size.width, self.view.frame.size.height)]; [UIView commitAnimations];}
correctY=-100向上移動100
沒有留言:
張貼留言