BEFORE READING "iOS 7 OMG DOWNVOTE"
The problem has been solved and is not related to iOS 7 at all. The problem was that with autolayout turned on, you cannot change the frame directly but must edit constraints instead.
So I have an app that is in the App Store and I you type in some UITextField
s but some of the text fields were covered by the keyboard so I programmatically moved them up. Now I am working with the Xcode and iOS 7 betas and this functionality stopped working. Here is my code:
-(void)textFieldDidBeginEditing:(UITextField *)textField{
textFieldRect = textField.frame;
textField.frame = CGRectMake(5, 80, self.view.frame.size.width-10, 31);
}
-(void)textFieldDidEndEditing:(UITextField *)textField{
textField.frame = textFieldRect;
}
I check with an NSLog
for the width of textFieldRect
and TextField.frame
at the end of textFieldDidBeginEditing:
and the values are different (as they should be), yet there is no visual change. I know there are other ways to protect the textField from the keyboard, but I would really prefer to get this working as I hope to animate it, and I know that there is no reason this would not be possible.
UITextField
s are some sort of new thing that your not supposed to talk about yet... – Stereochromy