-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ios6 AutoLayout Support #17
Comments
I have the same issue too. |
me 2 |
It is really an issue between UIScrollView and autolayout. One way to reduce (not totally eliminate) it is by adding a UIView as a subview to the scrollview. You can then put your objects in the UIView and expect a more normal autolayout behavior. |
I'm not sure if I understand this issue, but I am using iOS 6 with Autolayout in Storyboard, and I get extra space at the bottom after the keyboard is dismissed. Also, using a tab bar controller and going back and forth between different views also seems to mess up the scrollview's scroll position and content size. I fixed all of these problems by using the following implementation: Setup these properties in the view controller that contains the TPKeyboardAvoidingScrollView
Implement these methods in the view controller that contains the TPKeyboardAvoidingScrollView
Replace a line of code for method "keyboardWillHide" in TPKeyboardAvoidingScrollView.mChange...
to...
Doing some NSLog debugging showed that the scrollview's bottom inset remains at 162 after the keyboard is dismissed, thus we get the extra space at the bottom. Now, everything is working as expected. I can place a view of any height inside the scrollview, and have it scroll and show/hide keyboard beautifully. I can also navigate through navigation controller stacks, or switch views using the tab bar controller, and it won't mess up the scrollview. I am not an expert programmer by any means, so I could be wrong about whether TPKeyboardAvoiding is compatible with Autolayout, as well as many other things. Please kindly let me know if I've done anything poorly. Big thanks to Michael Tyson, I love your API's and The Amazing Audio Engine! P.S. I have yet to test this on iOS 7, iPad, and landscape orientation. |
It seems that the view does not resize properly when using ios 6 and auto layout.
The text was updated successfully, but these errors were encountered: