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

Some separators still visible in long lists on iOS 14 #3

Closed
stefanengel opened this issue Sep 19, 2020 · 4 comments
Closed

Some separators still visible in long lists on iOS 14 #3

stefanengel opened this issue Sep 19, 2020 · 4 comments

Comments

@stefanengel
Copy link

Hi there,

I think this is a very cool idea!

It hides most of the separators of a list in iOS 14, but some of them stay visible if the list is long. I modified the example without separators from this repository to look like this:

struct ListWithoutSeparator: View {
    var body: some View {
        List {
            ForEach(0..<30) { index in
                VStack {
                    Text("Item \(index)")
                }
            }
        }
        .listSeparatorStyle(.none)
        .navigationBarTitle(Text("None"))
    }
}

and the result looks like this:
Bildschirmfoto 2020-09-19 um 10 47 11

I used Xcode 12 and iOS 14 on a simulator and on a real device.
Is there a way to hide all separators?

Repository owner deleted a comment from livesafemike Sep 19, 2020
@SchmidtyApps
Copy link
Owner

Unfortunately Xcode12 introduced some issues like this one in iOS14 that did not occur previously with my workaround. I am working on trying to find a new fix that hides all dividers 100% of the time. I will let you know if I figure out a new workaround.

@SchmidtyApps
Copy link
Owner

I have an experimental branch up and running that I believe fixes this issue. The only downside is a bit of a CPU spike when scrolling because it now listens for scrollview content offset to change and anytime it does it attempts to hide dividers again. I am going to continue working on improving the performance but if you can test it out to confirm it works I think it should be good enough to merge to master and I will open a new enhancement ticket for the performance issues.

Checkout this branch:
https://github.com/SchmidtyApps/SwiftUIListSeparator/tree/xcode12-issues

@hipwelljo
Copy link

I had the same issue and this is working really well for me!

@SchmidtyApps
Copy link
Owner

@hipwelljo Awesome glad to hear! I will go ahead and merge it to master. If you run into any more issues let me know.

SchmidtyApps added a commit that referenced this issue Sep 19, 2020
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

3 participants