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

Crush and Swipes #10

Closed
kfoau9h39 opened this issue Nov 2, 2020 · 3 comments
Closed

Crush and Swipes #10

kfoau9h39 opened this issue Nov 2, 2020 · 3 comments

Comments

@kfoau9h39
Copy link

iPages {
            ForEach(0..<10) {
                Text("Index \($0)")
            }
        }

Will swipe itself

and if I set array in forEach I get error:

Fatal error: Index out of range: file Swift/ContiguousArrayBuffer.swift, line 444

Снимок экрана 2020-11-02 в 15 53 05

@kfoau9h39
Copy link
Author

Error reproduced when I set empty array.

Why iPages swipes views itself?

@kfoau9h39
Copy link
Author

iPages makes duplicates of views

@blsage
Copy link
Owner

blsage commented Nov 4, 2020

Hi,

If you are talking about the unwanted animation that happens when the parent's state changes, that is now fixed. I tested your code, and it runs without bugs now.

Regarding your index out of bounds error, make sure not to programmatically change the pages binding to an out of bounds value. We discussed allowing out of bounds numbers as wrapping, but in the end decided it would cause more issues than fix them. If you would like this feature, let me know.

Also if you don't use your own selection binding, this shouldn't ever be an issue.

If you have any other code producing errors, definitely open more issues. Just let me know 😄

@blsage blsage closed this as completed Nov 4, 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

2 participants