-
Notifications
You must be signed in to change notification settings - Fork 330
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
AutoLayout / XIB #9
Comments
Are you using autolayout? |
Yup |
Would this post solve your problem? http://stackoverflow.com/questions/19917420/autolayout-violates-translation-rotation-animation |
It would but I think I found another problem. I read another autolayout/transform suggestion which was; Wrap everything in the view inside a new host/proxy container view.. And have the container view to set constraints.. What turned out doing that so is.. When i start dragging the Card the frame of the card gets bigger.. Thus the center changes and everything inside the card moved off the bounds.. It wasnt visible before. I can send a screenshot so you can see what I mean. Sent from my iPhone
|
Yes please. |
Ignore the "Invite friends" button please.. that is on a higer index on the main-view not on the card-view. So as you can see, when I have a structure like: ViewController Instead of; ViewController I can observe that when I move the card around, card starts getting bigger. This could be Bounds vs Frame issue when you are doing your magic? |
http://stackoverflow.com/questions/5361369/uiview-frame-bounds-and-center Are you using Bounds or Frame doing the calculations? I think it might be to do with Frame vs Bound issue. check the thread out. |
I am using bounds inside ZLSwipeableView. The problem might be that Autolayout uses frame instead of bounds. |
Solved it.. here is the trick after adding the proxy view I mentioned above:
So pretty much disabling autolayout when view starts moving. |
Nice, I'm glad that you solved the problem! On Wednesday, December 3, 2014, Cem Kozinoglu [email protected]
|
Great advice! thanks for this, it was driving me crazy! Thanks again! Great lib. |
@cemkozinoglu : Can you show me the code how you load the view from xib. I try to do the same thing but have problem while dragging, the image view is not bounded inside the card view (see screenshot) |
@peacemoon I just updated the demo app. It now includes an example that loads views from xib. |
@zhxnlai great, thank you |
@yingmu52 Thanks for reporting this issue! I just fixed it so please try the latest version of the demo app. |
@yingmu52 are you using iOS 8? I double checked and did not get any warning |
@yingmu52 That's weird, I tested it on both iOS 7 and iOS8 simulator and it worked fine |
https://www.dropbox.com/sh/6r5leuws1p59lyj/AAATZbxFUSXAhABic3HqTdVoa?dl=0 I have put my custom view under this link, it will be great if you could test it for me. thank you :) |
I have an issue where the swipeable view's frame is changed by auto-layout. but the card views have been pinned at the size before the swipeableview frame changed. Anyone know what I need to do? |
there are some problems while I use this with autolayout in iOS7 |
Hey awesome piece of code! Problem... When you load a card from XIB.. and move it around stuff within the card does not stay within the bounds.. hard to explain but let me send a screen show.
The text was updated successfully, but these errors were encountered: