Skip to content

Commit fd8ad22

Browse files
authored
Fix vertically bouncing EPUB resources in iOS 16 (#241)
1 parent 7c572dd commit fd8ad22

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ All notable changes to this project will be documented in this file. Take a look
3131
* [#61](https://github.com/readium/swift-toolkit/issues/61) Fixed serving EPUB resources when the HREF contains an anchor or query parameters.
3232
* Performance issue with EPUB fixed-layout when spreads are enabled.
3333
* Disable scrolling in EPUB fixed-layout resources, in case the viewport is incorrectly set.
34+
* Fix vertically bouncing EPUB resources in iOS 16.
3435

3536
#### Streamer
3637

Sources/Navigator/EPUB/EPUBReflowableSpreadView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ final class EPUBReflowableSpreadView: EPUBSpreadView {
3535

3636
override func setupWebView() {
3737
super.setupWebView()
38+
3839
scrollView.bounces = false
40+
// Since iOS 16, the default value of alwaysBounceX seems to be true
41+
// for web views.
42+
scrollView.alwaysBounceVertical = false
43+
scrollView.alwaysBounceHorizontal = false
44+
3945
scrollView.isPagingEnabled = !isScrollEnabled
4046

4147
webView.translatesAutoresizingMaskIntoConstraints = false

0 commit comments

Comments
 (0)