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 issue #115
Comments
Hi! I'm not able to reproduce the warning you're seeing. Could you provide a bit more details on your setup? Are you running one of the example targets? And which version of iOS and Parchment are you using? |
@rechsteiner Yeah sorry I couldn't give you more detail about the error. But I didn't do any customization or adjustment. I went through readme file. I tried to add both inside custom view and view controller's view but it still gave me the above layout error. I also gave title every controller, I looked all of the example projects. I tried to investigate the error but I couldn't do it because I have little time. |
Okay, no worries. Have you added any constraints to the view.constrainToEdges(pagingViewController.view) |
@rechsteiner Yes I saw your extension but I already add PagingViewController view into my already-constrained view. You can see example below;
|
Ah okay. Are you using the latest version of iOS and Parchment? Is there anything else you’re doing that might be relevant, like subclassing PagingViewController? |
Are you still having issues with this? |
Back again. I got the same auto-layout warning as @serhatsezer, When I try to add the |
Oh, that's because pagingViewController.view.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
pagingViewController.view.topAnchor.constraint(equalTo: view.topAnchor),
pagingViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
pagingViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
pagingViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
]) |
Fixed my issue 👍 , you're the best. |
@rechsteiner Great. I think this library is pretty neat. Will you fix this framework itself as well? or We can make a pull request for it. People who want to use this library may not see this issue. |
Thanks! I still haven't been able to reproduce the issue you're seeing, but if you could provide some steps for reproducing it I can fix it right away. And feel free to open a pull-request if you already have a fix for it. |
@serhatsezer I think I managed to get this fixed now with #125. Can you check out the If you're using CocoaPods you can target the master branch like this:
Or this if you're using Carthage:
|
@rechsteiner Okay it is worked. But there is another problem which I face now. I implemented via pod file which you provided me. Menu items collapsed when I didn't give any title label for FixedPagingViewController. But when I rotate the device in landscape mode it works well. But when I change to top anchor constraint to deprecated one it's working well. I think we should implement this layout code inside FixedPagingViewController this way we can give appropriate layout constraints.
My implementation; |
New version with both fixes is out now. Let me know if you find any other issues! |
@rechsteiner Great thanks. I'll use this framework for future projects. I'm also thinking to contribute to new features. Cheers! |
Awesome! |
I tried to use this library explained in the onboarding page but it gives me a auto-layout warning:
`[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x608000285f00 V:|-(0)-[UICollectionView:0x7f803388e800] (active, names: '|':Parchment.PagingView:0x7f8032d46f50 )>",
"<NSLayoutConstraint:0x608000286090 UICollectionView:0x7f803388e800.height == 40 (active)>",
"<NSLayoutConstraint:0x608000285690 V:[UICollectionView:0x7f803388e800]-(0)-[UIView:0x7f8032d41970] (active)>",
"<NSLayoutConstraint:0x608000282440 V:[UIView:0x7f8032d41970]-(0)-| (active, names: '|':Parchment.PagingView:0x7f8032d46f50 )>",
"<NSLayoutConstraint:0x600000292ac0 'UIView-Encapsulated-Layout-Height' Parchment.PagingView:0x7f8032d46f50.height == 0 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x608000285690 V:[UICollectionView:0x7f803388e800]-(0)-[UIView:0x7f8032d41970] (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.`
The text was updated successfully, but these errors were encountered: