I have a UIView
with a UITextField
placed at the bottom of the screen which will move up when a keyboard appears.
I have been following the bel
I used this code. It didn't move up in a scroll view. but changed their XY positions. but this is effective in my iPhone 6. i didn't check them with other iPhones.
func textViewDidBeginEditing(textView: UITextView){
textView.frame = CGRectMake(textView.frame.origin.x, textView.frame.origin.y - 216 , textView.frame.size.width, textView.frame.size.height)
buttonProp.frame = CGRectMake(buttonProp.frame.origin.x, buttonProp.frame.origin.y - 216, buttonProp.frame.size.width, buttonProp.frame.size.height)
MessageView.frame = CGRectMake(MessageView.frame.origin.x, MessageView.frame.origin.y - 216, MessageView.frame.size.width, MessageView.frame.size.height)
datePicked.frame = CGRectMake(datePicked.frame.origin.x, datePicked.frame.origin.y - 216, datePicked.frame.size.width, datePicked.frame.size.height)
}
func textViewDidEndEditing(textView: UITextView){
textView.frame = CGRectMake(textView.frame.origin.x, textView.frame.origin.y + 216, textView.frame.size.width, textView.frame.size.height)
buttonProp.frame = CGRectMake(buttonProp.frame.origin.x, buttonProp.frame.origin.y + 216, buttonProp.frame.size.width, buttonProp.frame.size.height)
MessageView.frame = CGRectMake(MessageView.frame.origin.x, MessageView.frame.origin.y + 216, MessageView.frame.size.width, MessageView.frame.size.height)
datePicked.frame = CGRectMake(datePicked.frame.origin.x, datePicked.frame.origin.y + 216, datePicked.frame.size.width, datePicked.frame.size.height)
}
All my components are programmed to move when editing begins. and move back after editing. manual editing. yes.