Latest 4.3.0
Homepage https://github.com/APUtils/StretchScrollView
License MIT
Platforms ios 8.0
Dependencies APExtensions/ViewState
Frameworks Foundation, UIKit
Authors

Carthage compatible
Version
License
Platform
CI Status

StretchScrollView provides functionality to enlarge title image and hide overlays when scrolling down. When scrolling up it allows to animate background of navigation bar.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

GIF animation

StretchScrollView

Installation

Carthage

If you are setting StretchScrollView class in storyboard assure module field is also StretchScrollView

StretchScrollView

Please check official guide

Cartfile:

github "APUtils/StretchScrollView" ~> 4.3

CocoaPods

StretchScrollView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'StretchScrollView', '~> 4.3'

Configuration

Assign StretchScrollView class to your UIScrollView in storyboard, assure module field is also StretchScrollView:

StretchScrollView

Set needed outlets and options.

StretchScrollView
StretchScrollView

Usually content mode Aspect Fill fits well for UIImageView:

StretchScrollView

Properly setup constraints for stretchedView. There are two resize modes available: by top and height constraints and by top and sides constraints.

Example constraints setups:

StretchScrollView
StretchScrollView

For second setup if scroll view is enlarged it’ll be automatically zoomed at center.

/// StretchScrollView will manage navigation bar transparency by itself.
/// You could disable this option to manage it by yourself or to disable navigation bar animations.
@IBInspectable var manageNavigationBarTransparency: Bool = true

/// In case of transparent navigation bar you may specify background color that will appear when you scroll up.
@IBInspectable var navigationBackgroundColor: UIColor = .clear

You are done! See example project for more details.

Contributions

Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.

Author

Anton Plebanovich, [email protected]

License

StretchScrollView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "StretchScrollView",
    "version": "4.3.0",
    "summary": "ScrollView that allows to stretch it`s image",
    "description": "StretchScrollView provides functionality to enlarge title image and hide overlays when scrolling down. When scrolling up it allows to animate background of navigation bar.",
    "homepage": "https://github.com/APUtils/StretchScrollView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Anton Plebanovich": "[email protected]"
    },
    "source": {
        "git": "https://github.com/APUtils/StretchScrollView.git",
        "tag": "4.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "StretchScrollView/Classes/**/*",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "dependencies": {
        "APExtensions/ViewState": [
            ">= 3.4.5"
        ]
    }
}

Pin It on Pinterest

Share This