Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird width on MXParallaxHeader 1.1.0 #114

Closed
vkcldhkd opened this issue Nov 19, 2019 · 13 comments
Closed

Weird width on MXParallaxHeader 1.1.0 #114

vkcldhkd opened this issue Nov 19, 2019 · 13 comments
Labels

Comments

@vkcldhkd
Copy link

Issue Description

  • Weird width on MXParallaxHeader 1.1.0

Environment Information

  • MXParallaxHeader 1.1.0
  • iPhone7 11.3.1, iPhone XR 13.2.2
  • Xcode 11.2.1

Your Code

let height: CGFloat = Constants.APPDELEGATE.cellSize.height + 50 + UIWindow.safeAreaTopInset

    override func viewDidLoad() {
        super.viewDidLoad()

        detailTableView.contentInsetAdjustmentBehavior = .never
        headerView = PostDetailCardView()
        detailTableView.parallaxHeader.view = headerView
        detailTableView.parallaxHeader.height = height
        detailTableView.parallaxHeader.mode = .fill
        detailTableView.parallaxHeader.minimumHeight = 0
}

Screenshot

IMG_0058
by MXParallaxHeader 0.6.1

IMG_0059
by MXParallaxHeader 1.1.0

@macoapps
Copy link

Same issue here :(

@alflix
Copy link

alflix commented Nov 25, 2019

as for me, add width constraint of your headerView cant fix this issue

@iOSDevFin
Copy link

I have the same issue

@Nahatakyan
Copy link

Nahatakyan commented Nov 28, 2019

I have the same issue. I fixed it like this.

tableViewHeaderView = TableHeader(frame: view.bounds)
tableViewHeaderView.translatesAutoresizingMaskIntoConstraints = false

tableView.parallaxHeader.view = tableViewHeaderView
tableView.parallaxHeader.height = view.frame.height * 0.6
tableView.parallaxHeader.mode = .fill
tableView.parallaxHeader.minimumHeight = 0

tableViewHeaderView.widthAnchor.constraint(equalTo: tableView.widthAnchor).isActive = true

@macoapps
Copy link

Nice fix, it works perfectly for me !

@stale
Copy link

stale bot commented Jan 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 29, 2020
@Harshvk
Copy link

Harshvk commented Feb 5, 2020

Getting the same issue. The above-mentioned solution is also not working when header is instantiated from the nib.

@stale stale bot removed the stale label Feb 5, 2020
@RaheelCr7
Copy link

Scroll not working after I am adding width constraint!
please help

@SandsHellCreations
Copy link

Above solutions didn't work same error
Screenshot 2020-05-15 at 3 30 06 PM

@SandsHellCreations
Copy link

SandsHellCreations commented May 15, 2020

Issue is in your latest version of pod
0.6.1 this release version of your code working fine

@MohdElBasyouni
Copy link

Same problem here and thanks to @Nahatakyan , below code fix it;

tableViewHeaderView.translatesAutoresizingMaskIntoConstraints = false
tableViewHeaderView.widthAnchor.constraint(equalTo: tableView.widthAnchor).isActive

@moquiutijunio
Copy link

moquiutijunio commented Jul 9, 2020

I solved this problem fixing width in my header view!

@stale
Copy link

stale bot commented Sep 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 7, 2020
@stale stale bot closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants