<commit_before># Scrolling Content View #

This library provides two scrolling content views:

* `VerticalScrollingContentView`
* `HorizontalScrollingContentView`

The useful thing about these views is that they infer their content size based on the subviews that are added (to the `contentView` property). As long as all of the subviews have a size defined by auto layout and the `contentView` can infer its size from the auto layout constraints between its subviews and itself.

Included is also a really simple way to add a set of vertical subviews or horizontal subviews.

## Instantiating

The best way to instantiate a scrolling content view is by setting the custom class in Interface Builder to either `VerticalScrollingContentView` or `HorizontalScrollingContentView`.

You can also use `init?(coder:)` and `init(frame:)`.

## Populating

Call the `addSubviews(subviews:)` or `addSubviews(subviews:, withMargins:, viewSpacing:)` method.

This will internally add the given subviews to the underlying `contentView` of the object on which the method is invoked. Subviews are added one after the other in a vertical or horizontal fashion, with the given spacing between each. By default, the margins at the top, left, bottom, and right are all 0. And the spacing between each view is also 0 by default.

You can alternatively add subviews yourself. If doing so, you should add the subviews to the `contentView` rather than to the scrolling content view itself.<commit_msg>README.md edited online with Bitbucket<commit_after># Scrolling Content View

A simple way of adding content views to a scroll view, such that the scroll view's content size is determined automatically based on the auto layout constraints of its subviews.

## Included in the Library

This library provides two scrolling content views:

* `VerticalScrollingContentView`
* `HorizontalScrollingContentView`

The useful thing about these views is that they infer their content size based on the subviews that are added (to the `contentView` property). As long as all of the subviews have a size defined by auto layout and the `contentView` can infer its size from the auto layout constraints between its subviews and itself.

Included is also a really simple way to add a set of vertical subviews or horizontal subviews.

## Instantiating

The best way to instantiate a scrolling content view is by setting the custom class in Interface Builder to either `VerticalScrollingContentView` or `HorizontalScrollingContentView`.

You can also use `init?(coder:)` and `init(frame:)`.

## Populating

Call the `addSubviews(subviews:)` or `addSubviews(subviews:, withMargins:, viewSpacing:)` method.

This will internally add the given subviews to the underlying `contentView` of the object on which the method is invoked. Subviews are added one after the other in a vertical or horizontal fashion, with the given spacing between each. By default, the margins at the top, left, bottom, and right are all 0. And the spacing between each view is also 0 by default.

You can alternatively add subviews yourself. If doing so, you should add the subviews to the `contentView` rather than to the scrolling content view itself.

There are also the following methods that can be used to add vertical or horizontal subviews to any type of view.

```
addVerticalSubviews(_:withMargins:verticalSpacing:)
addHorizontalSubviews(_:withMargins:horizontalSpacing:)
```
{'fraction_non_alphanumeric': 0.049151550614394385, 'fraction_numerical': 0.0011702750146284377, 'mean_word_length': 5.182640144665461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7330450', 'n_tokens_mistral': 860, 'n_tokens_neox': 818, 'n_words': 488}