Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/paulja/scrollviewerautolayout

Sample iOS application that shows how to use `AutoLayout` with a `UIScrollView` and zero code
https://github.com/paulja/scrollviewerautolayout

Last synced: 4 days ago
JSON representation

Sample iOS application that shows how to use `AutoLayout` with a `UIScrollView` and zero code

Awesome Lists containing this project

README

        

# UIScrollView and AutoLayout, no code!

Sample iOS application that shows how to use `AutoLayout` with a `UIScrollView` where the content needs to be dynamic—or use constraints in the content view—with zero code to make the scrolling work.

Traditionally you would either use the `contentSize` property on the scroll viewer, set in the code at the right time; or used fixed sized content views. The approach in this sample enables dynamic sizing of the container in code as needed, but also allows you to use constraints in your views.

This approach was inspired by this [Technical Note](https://developer.apple.com/library/ios/technotes/tn2154/_index.html#//apple_ref/doc/uid/DTS40013309).

The is the sample code for a blog post that will soon follow.