-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Not animating UIImageView with autolayout #160
Comments
Looks like you've top pinned your UIImageView with TopLayoutGuide. On Saturday, February 7, 2015, Andre notifications@github.com wrote:
Sent from My iPhone |
Thats not quite the result I wanted... I would like to keep the logo at the screen, so the autolayout is fine for that to work. The problem is that the frame is being reset instead of being animated. I dont know exactly whats responsible for this but the result I would like to see is my logo shrinking animated instead of poping smaller/bigger. |
Under the hood, I'm finding topViewControlller in UIWindow hierarchy and moving it's view frame up-down, but due to top pining from top layout guide, your image is not moving with view, image is keeping distance from top layout guide. Could you please elaborate what behaviour you want to achieve? |
How is it working now: as I hit the textField, they key board goes up as does the view, both animated (rolling up/down swiftly). How I wanted it to work: instead of the 2 states, I wanted my image to animate according to the autolayout. In the demo video it should shrink animated as I go to the next responder. Dont get me wrong, pinning to the view works just fine but the logo gets hidden as the view scrolls. I want to keep all the logo on the screen resizing it with animation, thats why I pinned to the top layout guide. Thanks for you time so far. |
Ok, I'll check it and let you know my feedback. Thanks |
I checked the demo video and now understand what animation behaviour you wanted. I'm changing the self.view frame not UIImageView frame. UIImageView frame is resetting by the Auto-layout Engine. Changing self.view frame is doing in '-(void)setRootViewFrame:(CGRect)frame' method. You can play a hit & try with setNeedsLayout and layoutIfNeeded in animation block where library update rootViewController.view's frame. Please let me know the status of bug after trying above approach. Waiting for your reply. Thanks |
If I understand correctly, I was supposed to try this at your IQKeyboardManager.m None of the tries worked =/ |
The library is updating frame of self.view in an animation block internally and nothing more. Don't know why your image is not animating like you want. |
Hi, I am making my login screen and when I hit a textfield it seems like its seting the uiimageview frame instead of rolling the animation with autolayout.
Is there anything I can do to fix this?
UIImageView set with autolayout:
http://cl.ly/image/1M0v3M391f0F
Video showing the behavior:
http://cl.ly/0815060A2o0U
The text was updated successfully, but these errors were encountered: