Skip to content

only enable parallax effect in image view #7

@ghimireprashant

Description

@ghimireprashant

i have two view in header view one is header parallax view one is image view(default image view) and other view i have added.i want to disable parallax effect in other view ??? how to disable effect for other view

let options = StretchHeaderOptions()
options.position = .fullScreenTop //underNavigationBar

let canvasSize = CGSize(width: view.frame.size.width, height: 400)
let imageSize = CGSize(width: view.frame.size.width, height: 200)

header = StretchHeader()
header.stretchHeaderSize(headerSize: canvasSize,
                         imageSize: imageSize,
                         controller: self,
                         options: options)
header.imageView.image = UIImage(named: "image view")
header.addSubview(self.searchView)

searchView.translatesAutoresizingMaskIntoConstraints = false
searchView.heightAnchor.constraint(equalToConstant: 200).isActive = true
searchView.topAnchor.constraint(equalTo: header.imageView.bottomAnchor).isActive  = true
searchView.leftAnchor.constraint(equalTo: header.imageView.leftAnchor).isActive  = true
searchView.rightAnchor.constraint(equalTo: header.imageView.rightAnchor).isActive  = true

i dont want parallax effect in searchView.how to disable its effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions