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

Delete space between TableView top anchor and tableHaderFooterViews top #188

Open
7 tasks
alikenski opened this issue Sep 7, 2022 · 1 comment
Open
7 tasks

Comments

@alikenski
Copy link

alikenski commented Sep 7, 2022

Description

Have space between TableView top and tableHaderFooterViews top

What type of issue is this? (place an x in one of the [ ])

  • [] bug
  • enhancement (feature request)
  • [X ] question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

I have a bug or smth like that. There is a space between TableView top and tableHaderFooterViews top. But I do not want to have this. In simulator all is okey and there are no space, but in real devices have space.

Reproducible in:

PanModal version: 1.2.7

iOS version: 16 beta, 15

Steps to reproduce:

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

PanModalPresentable extension:

extension CouponListVC: PanModalPresentable {
    
    var panScrollable: UIScrollView? {
        tableView
    }
    
    var longFormHeight: PanModalHeight {
        tableView.layoutIfNeeded()
        let height = tableView.contentSize.height
        return .contentHeight(height)
    }
    
    var cornerRadius: CGFloat {
        24
    }
    
    var showDragIndicator: Bool {
        false
    }
}

Table View:

private lazy var tableView: UITableView = {
        let tbv = UITableView()
        tbv.allowsSelection = false
        tbv.separatorStyle = .none
        tbv.backgroundColor = Colors.secondaryGray
        tbv.showsVerticalScrollIndicator = false
        tbv.showsHorizontalScrollIndicator = false
        tbv.alwaysBounceVertical = false
        return tbv
    }()

Simulator:
Снимок экрана 2022-09-07 в 12 19 16

Real device:
IMAGE 2022-09-07 12:24:10

View Hierarchy in XCode
Снимок экрана 2022-09-07 в 12 23 25

@alikenski
Copy link
Author

alikenski commented Sep 7, 2022

I have found solution:
Apple added padding in content top in iOS15:

 if #available(iOS 15, *) {
    tableView.sectionHeaderTopPadding = 0
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant