Is it possible to move the selected item from horizontal ScrollView to the most far left position in the ScrollView? I can't use "scrollTo" which ScrollViewReader provides (iOS 13 support)
Bassicly I need to auto move the selected item so it becomes fully visible on the screen.
Any ideas?
Thanks in advance everyone!
Related
I have an app similar to most with a main view that scrolls vertically. On top of that, I have a horizontal drag gesture to pull out a side menu.
The issue I am running into when trying to drag the menu open is any vertical movement at all stops the horizontal gesture from working until the vertical movement has ended. So it is very difficult to get the horizontal gesture to activate.
I have tried using .highPriorityGesture and .simultaneousGesture but neither seem to help.
Adding a minimumDistance on the Vertical gesture should fix it
DragGesture(minimumDistance: 10)
There are two solutions I have seen can be used to change the colour of the title bar in SwiftUI:
Making the use of NavigationView
Ignoring the sage area with .ignoresSafeArea()
I have no use for a NavigationView nor I want to use .ignoresSafeArea() since it helps on giving the TabView bottom tab space.
The only requirement to the solution I am looking for is that it cannot be for iOS 16 and above only, since it will not be viable to use in production for at least the next two years.
TL;DR:
I need to change the colour of the title bar (the upper-most part of the app) with features available in versions prior to iOS 16, and without the use of NavigationView and .ignoresSafeArea()
The white stuff in this image:
I have a List that I'm implementing in tvOS with swift UI and when scrolling down on the list, a gradient appears at the top of the list (presumably to indicate there are items above)
Essentially, what I'm looking for at the top of the List is:
But, I'm seeing this:
How do I remove that top gradient fade and simply have a straight edge?
Use a VStack (or LazyVStack) in a ScrollView. List uses UITableView behind the scenes, which has the fade, but ScrollView does not.
In SwiftUI does anyone know if there's a way to use NavigationLink to slide destination view up from the bottom?
Is it possible reverse the scroll position in a scrollview so it scrolls from the bottom up?
It would be helpful to do this because it would allow me to lay the scrollview flat and stand the surfaces up and still have the first surfaces at the front.It's a bit hard to explain so I have this image Basically I am trying to scroll through these surfaces like a filing system. Is there perhaps a better way to simulate this?