Comments (2)
Apologies, I found a workaround:
.onPageChanged { newIndex in ... self.currentPage = newIndex < 0 ? 0 : newIndex }
from swiftuipager.
Hi @JetPlaneJJ , this is a indeed a bug and has been fixed in version 1.9.2. Some notes here for your code:
- You don't need
.onPageChanged { newIndex in self.currentPage = newIndex }
. You're passing a binding toPager
which means that variable is shared by both yourContentView
andPager
. It gets updated automatically. - The scroll was lagged in version 1.9.0 but was fixed in version 1.9.1.
.swipeInteractionArea(.page)
is the default behavior ofPager
, so that shouldn't "fix" anything.contentLoadingPolicy(.lazy(recyclingRatio: 2))
gives a ratio that's lower than the default value. It depends on each case but this might lead into trouble, I recommend not change it.
Please don't be afraid to open any issue if you encounter problems.
from swiftuipager.
Related Issues (20)
- [BUG] Weird moving transparent Image appearing when scrolling fast.
- [BUG] tvOS NavigationLink not work HOT 1
- [FEAT] Hide scroll indicator on watchOS
- [BUG] To many pageView request
- [BUG] The element inside of Pager is hidden when when it goes beyond the screen border HOT 2
- [FEAT] Page Indicator dots (`PageTabViewStyle.IndexDisplayMode`) at the bottom according page count HOT 2
- Pager not shown when using inside ScrollView HOT 3
- Pager Size according to the inner view
- [BUG] App Crashes detected HOT 2
- [BUG] Cant swipe, the page goes back to first
- [BUG] Item's with different size does not work as expected for swipeDirection vertical
- Auto Scroll horizontally one item at a time when user is not interacting
- [FEAT] Ability to not clip children HOT 1
- Multiple Page nesting causes sliding bug
- [FEAT] .dragBackwardsOnly() ? HOT 1
- [BUG] macOS 14 displays focusRing HOT 2
- [FEAT] The anchor point for interactive scaling
- [FEAT] Interactive Blur Effect
- [BUG] Pager scrolls in the opposite direction in RLT languages
- [FEAT] Do not deallocate page when scrolling to next page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftuipager.