12,495 questions
0
votes
1
answer
56
views
iOS 26: UIScrollView topEdgeEffect not applied
I am trying to use the topEdgeEffect API in iOS 26, but even setting the effect style to ".soft" does not work:
class ViewController: UIViewController {
var scrollView: UIScrollView!
...
2
votes
0
answers
52
views
UIScrollView zoomed UIImageView doesn’t bounce on vertical edges during pan
The Issue
I've created a zoomable image component for SwiftUI by wrapping UIScrollView and UIImageView using UIViewRepresentable. The core functionality, like pinch-to-zoom, double-tap-to-zoom, and ...
0
votes
1
answer
119
views
UIScrollView in UIViewControllerRepresentable - UI freezes when content touches bottom SafeArea
The SwiftUI ScrollView lacks some features I need and so I created a custom MyScrollView based on UIScrollView wrapped within a UIViewControllerRepresentable. While this works fine in general I know ...
0
votes
1
answer
50
views
UIContextMenuInteraction not working if view is originally offscreen
I’m having a weird UIKit problem. I have a bunch of views in a UIScrollView and I add a UIContextMenuInteraction to them when the view is first loaded.
The interaction works great for any of the views ...
0
votes
0
answers
47
views
iOS - Swift - UICollectionView inside UITableViewCell do not scroll after first show
I have this class:
class SectionCellRowCollection: UICollectionView, UICollectionViewDataSource, UICollectionViewDelegate {
required init?(coder aDecoder: NSCoder){
fatalError("...
0
votes
1
answer
60
views
ScrollView is not scrolling
I have the following scrollview but it's not scrolling. How can I fix it?
private func setupUI() {
let scrollView = UIScrollView()
scrollView.translatesAutoresizingMaskIntoConstraints = false
...
1
vote
0
answers
44
views
How can I make scrollview content vertically centered at the top and bottom, as well as scale content down as it gets farther from the center? [duplicate]
Here is what I would like to do:
I would like to make a scrollview in my app where when the user scrolls all the way to the top, the top content is exactly in the middle of the view, same thing for ...
0
votes
1
answer
34
views
Scaling up a UIView seems to affect firing of UIGestureRecognisers
I’m using VNRecognizeTextRequest to provide VNRecognizedTextObservation datum. The image is shown in UIImageView with UIViews of the BoundingBoxes identified, all being subviews of a parent UIView. ...
-2
votes
1
answer
74
views
ScrollView does not show content beyond the initially visible screen in iOS
I’m working on a UI layout with a ScrollView and a ContentView inside it. When the app is launched, the ContentView displays only the content that fits on the screen initially. However, when I try to ...
0
votes
0
answers
64
views
How to setup Auto Layout constraints (or SwiftUI hack) that mimic iMessage's scroll-to-dismiss of input bar
Let's say I'm trying to mimic iMessage's message view. Currently, I have a UICollectionView and a text input view that are subviews of a UIViewController's view. The constraints are laid out to place ...
-1
votes
1
answer
79
views
Incorrect display of elements in UIScrollView
I use the scroll on the screen. At the same time, when displaying the screen on SE there are no problems, when displaying on large screens, a large gap appears between two elements.
How to change this ...
1
vote
1
answer
645
views
SwiftUI Sheet with ScrollView like in Apple Maps
I want to create a sheet in SwiftUI, it has 3 PresentationDetends Types [.fraction(0.2), .medium, .large]. When I add these 3 types, I can move the Sheet to the 3 sizes I want.
However, I also want to ...
0
votes
1
answer
67
views
UIScrollView aligns its content's origin to its bound's center on first render, why is that?
I'm trying to learn UIKit and toying around with a UIScrollView. My goal is to create a UIScrollView that contains an image that I can pan and zoom.
Upon first render, as title says, the image's ...
1
vote
0
answers
58
views
Changing the size of the content view in a zoomable/pan-able UIScrollView
I have a component that displays a UIView inside a UIScrollView and makes the view zoomable and pan-able. In general, the component works well, but there's a case where it breaks pretty significantly:
...
2
votes
1
answer
2k
views
SwiftUI: Nested scroll views on opposite axis
I am trying to create an interface with a vertical scroll view at the top level, then a horizontal scroll view (using the new paginated scrolling from iOS 17) to display a number of child views that ...
0
votes
1
answer
77
views
How to detect user scrolll on the scrollview
i want to detect when the user scroll on the scrollview and above a certain scroll item show up a button, i wrote this code on my up looking online some example but there is no printout on the change ...
0
votes
1
answer
45
views
When using UIScrollView, how can I fade the left and right edges if content is outside the visible bounds?
Let's say I have a horizontally scrollable UIScrollView with various types of content. It could be images, UIViews etc. I would like to fade transparent the left and right edges if the content is ...
1
vote
1
answer
187
views
How to right align a UIStackView inside a UIScrollView when the stack view's size is smaller than scroll view?
Please look at the below picture of my storyboard to understand the layout of my views.
On the left side is a horizontal UIStackView with 2 buttons. This is okay.
On the right side of the above stack ...
1
vote
1
answer
2k
views
SwiftUI / Animation based on scrollPosition in ScrollView
I am working on a IOS SwiftUI project where I’m trying to replicate this kind of animate on scroll behaviour (not sure if it has a name):
https://www.lemonde.fr/les-decodeurs/visuel/2023/06/07/...
1
vote
1
answer
88
views
UIScrollView automatically scrolls UIImageView to top on pinch-to-zoom
I'm having issues with UIScrollView when doing pinch-to-zoom UIImageView. Implementation is relatively simple which you can find in many places on the Internet. Double tap to zoom in and out works ...
2
votes
2
answers
2k
views
iOS 17 SwiftUI: Color Views in ScrollView Using containerRelativeFrame Overlap When Scrolling
I'm encountering a layout issue in SwiftUI on iOS 17 where Color views within a VStack inside a ScrollView begin to overlap as I scroll down. Each Color view is supposed to take up the full container'...
0
votes
1
answer
84
views
SwiftUI: Issue while trying to implement a scrollview
I am developing an app on SwiftUI. Everything works fine until I try to wrap my code inside a scrollview. The problem is that my first image inside ZStack automatically leaves some space at the top ...
1
vote
1
answer
301
views
Blur Effect at Top of Screen When Scrolling in UIScrollView
I'm encountering a problem where a blur effect appears at the top of the screen when scrolling in a UIScrollView. Despite my efforts to resolve the issue, I haven't been successful. Below are more ...
0
votes
1
answer
30
views
How do I know through code if I can scroll to one side or the other in Unity?
I need to include tooltip images. If it is possible to scroll down, I include the bottom tooltip. If it is possible to scroll up, I include the top tooltip. If I can scroll up and down, I turn on both....
0
votes
1
answer
183
views
App slow down a lot when display data on a scrolling view
I am building an app with a scrolling view to create a feed. I have a view model that provide the data and the SwiftUI display it. As of now, I have followed a clean parttern and not pulling yet data ...