Improve dismissing ScrollView#79
Conversation
|
You can attach gif or video with bug which you fix? |
This one is a code only bug. When you are showing UITableViewController embedded in UINavigationController it's not possible to dismiss it with swipe. |
Hi, I am facing to this issue and I created a PR just for this case Could you test this Pull Request? #77 Maybe it'll resolve this issue. Best |
|
@Tavernari Nope, it doesn't helped when I'm showing If I have only |
|
@dstranz you can attach simple project with bug? |
|
@ivanvorobei I've added this code let headerView = UIView(frame: .init(x: 0, y: 0, width: tableView.frame.height, height: 100))
headerView.backgroundColor = .red
tableView.tableHeaderView = headerViewto |
|
@dstranz thanks! |
|
@ivanvorobei OK, sorry. I wasn't precise. I haven't got any idea how to move headerView itself. That's the reason why I apply transformations to tableHeaderView.subviews. But I will be of course the best to move tableHeaderView itself if we would know how to do that. |
|
@dstranz I just see that this does not fix the situation. If this helped you, check if you have added any changes. So far, what I see is not working |
|
@ivanvorobei That's the code that could replicate my case - for it my fix helps: let headerView = UIView(frame: .init(x: 0, y: 0, width: tableView.frame.height, height: 100))
headerView.backgroundColor = .clear
let testView = UIView(frame: headerView.frame)
testView.backgroundColor = .red
testView.translatesAutoresizingMaskIntoConstraints = false
headerView.addSubview(testView)
NSLayoutConstraint.activate([
headerView.leadingAnchor.constraint(equalTo: testView.leadingAnchor),
headerView.trailingAnchor.constraint(equalTo: testView.trailingAnchor),
headerView.topAnchor.constraint(equalTo: testView.topAnchor),
headerView.bottomAnchor.constraint(equalTo: testView.bottomAnchor),
])
tableView.tableHeaderView = headerViewBut it will be better to find better solution to move whole tableHeaderView - if you know how to move it ;) |
|
@ivanvorobei I've just found a better solution for this issue, just transform whole UIScrollView: It works fine with #79 (comment) and #79 (comment) |
|
@dstranz it work and I am merged but problem with scroll indicator.... incorrect top inset. When I am use translation for each subviews, scroll save position and not change indicator inset. Now indicator translate with scroll.. |
|
@ivanvorobei Sorry, I didn't found that while testing (but it's also visible on my gif). Do you have any idea how to fix tableHeaderView bug without adding this white space on the bottom? |
|
@dstranz now I recommended create custom table view cell. In next... I am try found solution |
|
Hi! Any updates? |
Improve dismissing ScrollView




Uh oh!
There was an error while loading. Please reload this page.