Restore the scroll position after close the overlay - overlay

In my case, I need to create a full page overlay, and when I close the overlay I'd like to see the scroll bar to stay at where it was. Exactly like what pinterest.com does.
But unfortunately, in my case, when I close the overlay, the scroll bar always sits on the top of the main page.
Does anyone have any idea about this?
Thanks

Related

How can I make the bottom navigation always visible in Android studio?

I am wondering how can I make the bottom navigation always visible in Android studio.
I would like that when filter options is clicked, the new full-screen page is slid from right to left. And on the new screen, you can still see the bottom navigation. I am attaching a picture for a better representation image
Does anybody know what is the best practice to achieve that?
Thank you for any help you can offer
I've tried with activity and popups but I couldn't get the right result.

Unity Panel Interaction Issue

I have two panels in unity 2d directly overlapping each other and they use scroll panels so I can scroll down. I have it set so when one is accessed, the other is pulled up, but when they swap the other panel is grey and I cannot interact with it, but when I attempt to scroll the other panel scrolls instead, even though it is hidden and turned off.
I suspect that this is a bug in the code. It's possible, that when the user presses the scroll button in the first panel, and then releases the button, the second panel's scroll button thinks, it's already been pressed by the user, when in fact it isn't.
Set it up in such a way, that when you release the button on a scrollbar (the first scroll bar), it resets the click on the scrollbars connected to it (a second scroll bar).

SwiftUI - Navigation View opening with Back button and half grey screen / weird behavior

I am trying to add navigation view to my app, but it is causing issues. My main UI is an infinitely swipe-able carousel of pages. It originally looks like this:
Then when I wrap it in a navigation view, it opens like this, with a back button and nothing else:
When I hit the back button, it looks like this:
The left side is swipe-able like the original UI, but when I touch the right, grey side, it takes me back to the empty page with the back button.
Any idea what may be causing this? I implemented the infinite carousel by putting each page in a ZStack, and using offsets/relativeLocation. I referred to this tutorial:
https://www.youtube.com/watch?v=fB5MzDD1PZI
Can I not use a NavigationView? Is there an alternative route I can take in which I create my own top NavBar and navigate to separate views without NavigationBar/NavigationLink?
Any help is appreciated and please feel free to ask questions, etc. Thanks!
You want to apply StackNavigationViewStyle to your NavigationView.
NavigationView {
...
}.navigationViewStyle(StackNavigationViewStyle())
You're experiencing an unwanted split view, and you can find more info here.
For larger devices like an iPad or iPhone Pro Max in landscape, it defaults to DoubleColumnNavigationViewStyle.

scrollview with page control reset

Okay, I have a Scroll View with Page Control that works properly between 2 sections (2 pages).
So I can scroll left and right once. Is it possible to always scroll right?
Like when you get to page 2, it expands to the right, but not allowing to scroll back left.
I dont need it to simply add another page and have 3 pages then 4. at all times there should be only 2.
The reason I need this function is because I will use the scrolling to reset data. As you scroll to the right a duplicate of the interface with cleared fields will come on to the screen as the interface with the old data will go off. Its a neat way to reset, not just a boring old button.
Can someone point me in the right direction on how to do this?
There are many examples of this. Here are a couple.
InifiniteHorizontalScroll
StreetScroller
Hope this helps.

Does anyone know which ui class can show the red delete icon on the left top corner?

When you use your safari on iphone, you can see the page control on the right bottom corner.
If you press this button, all pages will show, also they can be edited too.
I try to do the similar thing like this.
I want to press my edit button on the toolbar, then all the subview will appear a delete control on the left top corner(right top corner all ok). I tried to use the tableviewcell(setEditing method), it show the delete control, but isn't appear on the top corner.
Do you have any ideas? Or, Am I doing something wrong by using tableviewcell?
A table-view cell definitely isn't the right approach here. That editing control is a custom one, probably a generic UIButton with a red-encircled X graphic. There isn't a built-in class that'll give you the behavior you're looking for; you'll have to roll your own, probably using a UIScrollView (with pagingEnabled set to YES) with your “page” views laid out in a row inside it.