Bug 16976 - UIScrollView in pure Auto Layout mode sets ContentSize and break constraints
Summary: UIScrollView in pure Auto Layout mode sets ContentSize and break constraints
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.6.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-12-27 13:47 UTC by softlion
Modified: 2013-12-28 09:03 UTC (History)
0 users

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description softlion 2013-12-27 13:47:00 UTC
Hi,
i've tryed to implement a UIScrollView in pure auto layout mode, using the ios tech note and a very well explained blog (which was using objective c). 

blog: http://codehappily.wordpress.com/2013/11/14/ios-how-to-use-uiscrollview-with-autolayout-pure-autolayout-approach-multiple-smaller-views/

apple technote: https://developer.apple.com/library/ios/technotes/tn2154/_index.html


Whatever i do, this constraint is always added and breaks autolayout by forcing the ContentSize instead of letting the ContentSize be driven by the autolayout.

"<_UIScrollViewAutomaticContentSizeConstraint:0x14269d00 Ac.Touch.Views.ConnectionsScrollView:0x140adb70.contentWidth == 0.000000>"


I now think it is a bug in monotouch.


See my post on stackoverflow: http://stackoverflow.com/questions/20784653/uiscrollview-with-autolayout-pure-approach

I used the same appearance hierarchy and constraints, but i keep having the error 'Unable to simultaneously satisfy constraints'. The problem relies in the 'Container View' whose constraints can not be set to 0 right/bottom spaces of the scrollview without triggering the error. But if these constraints are removed, the 'Container View' has no width/height and the scrollview does't scroll.
Comment 1 softlion 2013-12-28 09:03:46 UTC
I've created a new scrollview in pure autolayout mode and it works ok.

So i'll check again back into my 2 others examples to see what is really wrong.