Skip to content

Commit e7e2c50

Browse files
committed
chore(core): UIKit's paging values and math, measured on iOS 26.2
1 parent ffea74d commit e7e2c50

11 files changed

Lines changed: 906 additions & 79 deletions

File tree

‎.changeset/uikit-paging-values.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@astryxdesign/core': patch
3+
---
4+
5+
[chore] Internal: UIKit's paging values and math for touch presentations. The page a release settles on, the settle that carries it there and `setContentOffset(animated:)` are measured on iOS 26.2 and replayed against the recorded frames to under half a pixel. Not exported from the package entry point; no component uses it yet.
6+
7+
@vjeux

‎packages/core/src/motion/MEASUREMENTS.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ installed); rows marked † also on iOS 18 for the pre-glass delta. iPhone
4343
| M-S2 | Momentum coast | A long list (Contacts, or a probe table of 500 rows): flicks released at 1000, 2500, 5000 pt/s | contentOffset(t) from release to rest; decay constant; per-millisecond vs per-frame model; the speed at which it stops | C | `decay.ts` |
4444
| M-S3 | Bounce-back spring | Same list: drag 120 pt past the top, hold still, release; a flick into the top edge at 3000 pt/s | contentOffset(t) after release and after edge contact; spring response and damping ratio; velocity hand-off | C | `scroll.bounce` |
4545
| M-S5 | Rubber band | Same list on an 852 pt view: drag 100, 300, 600 pt past the top; a horizontal pager | displayed overflow against finger overflow; confirm c = 0.55 and d = the view's size on the axis | C | `scroll.rubberBand` |
46-
| M-PG1 | Paging | Photos full-screen swipes; a probe paging scroll view | page chosen per release position × velocity (thresholds; at most one page?); contentOffset(t) onto the page | B, C | `scroll.paging` |
46+
| M-PG1 | Paging | Photos full-screen swipes; a probe paging scroll view | page chosen per release position × velocity (thresholds; at most one page?); contentOffset(t) onto the page | B, C | `paging` (measured; see M-PG12) |
4747
| M-ST1 | Scroll to top | Settings scrolled down 500, 2000, 8000 pt; tap the status bar | contentOffset(t); duration against distance; curve or spring fit | B, C | `scroll.scrollToTopRate` |
4848
| M-N1 | Navigation push | Settings: tap General | incoming leading edge x(t), outgoing x(t) (parallax fraction), dimming alpha(t); animation parameters | A, B | `springs.navigationPush` |
4949
| M-N2 | Navigation pop | General: back button | same as M-N1 | A, B | `springs.navigationPop` |
@@ -71,6 +71,13 @@ initial velocity's sign flipped, a curve that overshoots. Push and pop are
7171
not Core Animation animations on iOS 26.2: UIKit writes presentation
7272
modifiers every frame from the main thread.
7373

74+
## Paging (UIScrollView `isPagingEnabled`, UIPageViewController)
75+
76+
| ID | What | App and gesture | Extract | Method | Feeds |
77+
| ------ | --------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------ | ------------------------------ |
78+
| M-PG12 | End of a settle | Same pager: releases at rest from 10 %, 49 %, 60 % and 90 % of a page, logged at 120 fps | remaining distance and step velocity at the frame the offset lands exactly on the page | C | `paging.integrator.restSpeed` |
79+
| M-PG13 | Settle velocity floor | Same pager: steady releases from 200 to 250 pt/s in 5 pt/s steps, at 25 % of a page | the slowest release whose `scrollViewWillEndDragging` velocity is not 0 | C | `paging.release.velocityFloor` |
80+
7481
## Gestures (UIKit gesture recognizers)
7582

7683
Thresholds the gesture system reads (`uikit/gestures.ts`). Safari on iOS runs

‎packages/core/src/motion/README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ from the package entry point; components import it by path.
1313
| ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1414
| `uikit/` | THE constants table: every spring, duration, deceleration rate, rubber-band constant and curve, with its source. |
1515
| `uikit/springs.ts` | Interaction springs (navigation, sheets, alerts, menus, controls, keyboard, banners) and the SwiftUI / UIKit presets. |
16-
| `uikit/scroll.ts` | UIScrollView: deceleration rates, rubber band, bounce-back spring, paging, `delaysContentTouches`, scroll to top. |
16+
| `uikit/scroll.ts` | UIScrollView: deceleration rates, rubber band, bounce-back spring, `delaysContentTouches`, scroll to top. |
1717
| `uikit/timing.ts` | Non-spring clocks and curves: press highlight, Core Animation's named curves, keyboard, Reduced Motion cross-fade. |
18+
| `uikit/paging.ts` | A paging UIScrollView: the integrator that settles a release on its page, the page rule, the catch, `setContentOffset(animated:)`. |
1819
| `uikit/navigation.ts` | UINavigationController: push velocity, parallax, dimming, transition clock, interactive pop finish rule. |
1920
| `uikit/gestures.ts` | Gesture recognizer thresholds, the velocity filter and the haptic stand-ins, as typed entries the gesture system reads. |
2021
| `MEASUREMENTS.md` | The UIKit reference captures each unconfirmed value still needs. |
2122
| `spring.ts` | Closed-form damped spring, every Apple parameterization, settling duration, a spring chasing a moving target. |
2223
| `decay.ts` | UIScrollView's momentum coast. |
2324
| `rubberBand.ts` | UIScrollView's resistance past an edge, and its inverse. |
24-
| `projection.ts` | Release targets: the rest point nearest the projected coast; paging. |
25+
| `projection.ts` | Release targets: the rest point nearest the projected coast. |
26+
| `paging.ts` | Paging: the page a release settles on, UIKit's paging settle as a playable curve, the animated page scroll. |
2527
| `bezier.ts` | Cubic-bézier timing functions (Core Animation's named curves). |
2628
| `animator.ts` | Compositor animator: springs, decays and any closed-form curve compiled to Web Animations, read back analytically. |
2729
| `useAnimator.ts` | React wrapper that never re-renders per frame. |

0 commit comments

Comments
 (0)