UIScrollView scroll strangely when UISearchBar begin editing - ios

I have a view with a search bar and a scroll view.
My views layout like below.
UIView
UISearchBar
UIScrollView
UITableView(the first page)
UITableView(the second page)
The scroll view scroll strangely by steps below.
Make the scroll view scroll to second page
Touch the search bar
While showing search display controller,the scroll view scroll to first page strangely.
How to make the scroll view stay in second page?
Oh,no!!I hope I had enough reputation to post image.😂

Related

Rounded button above the UISCROLLVIEW

I have been working in a project which has a uiscroll view where the uiscroll view size is set programatically with height 225 and width is self. I have created two uiimageView where it displays two images and I have animated it by moving using a page view controller. Finally the image moves atomically like a slide show with page view controller. I have removed the navigation controller do I need to keep a back button for navigation when I place a unbutton above uiscrollview it was stating like scrollview ambitious scrolling content. I need to place a rounded back button above scroll view. I have attached the image of my storyboard. When I tried to place a button it is not visible in stimulator header scroll view is the UISCROLLVIEW where the animated image is placed

iOS How to put scrollView inside scrollView but not allow the internal scrollView to scroll the external?

In my app I have a modal View Controller that gets dismissed by dragging the screen down, but in the center of that screen I have UITextView. The problem is that when I scroll to the top of the textView and drag its content down the View Controller gets dismissed. How can I avoid that? I would like the external scrollView to scroll independtly of the textView.
I used title like that because I suspect it's the same problem, but please correct me if I'm wrong

Starbucks App Modal View Controller with MapView And TableView

I'm looking to replicate the basic functionality of the Stores finder in the new Starbucks app but am unsure as to how I would go about implementing the sliding aspect of presenting the view:
The main aspect of the functionality I am trying to replicate is the ability to present the modal and have it dismissible by sliding it down off the screen or expand to full screen when scrolled up.
Also notice how the scroll bar doesn't overflow the modal (tableview)? I'm not sure if this is a tableview nested within a scrollview. Either way, the scroll seems to be controlling both the scrolling of the tableview and the moving of the modal at the same time, which is neat.
Update: I'm able to dismiss the Modal by sliding it down but still not able to expand to full screen when scrolled up without having the scrollview scroll when I pan. I want the scrollview to flash the scroll indicator but not do the scroll while I'm growing the containing view to full screen, and resume scroll after I reach full screen. All without having to disable bounce at least when scrolled downwards.

Custom View for scroll in UITableView

I need to create a custom view for scroll the UITableView/ ScrollView.
Here I attached the picture,
While scroll the color I need to scroll the tableView and up/down arrow button press also the same function.
How can I implement the scroll.
Create a UIView subclass that has controls for moving the page and the scroll bar.
Then you can update the scroll bar from the scrollViewDidScroll method.
Similarly, when the buttons are pressed you can tell the scroll view to setContentOffset.

UIScrollView scrolls when clicking "Back" button in UINavigationBar

I have a UIViewController with a paged UIScrollView (3 pages). My View always starts at the second page, the middle one. The problem is that when I hit the back button in the UINavigationBar, the UIScrollView scrolls to the first page, and after that it disappears (popped from Nav Controller's stack).
The visible animation behaviour is horrible.
I want the UIScrollView not to scroll when I hit the BACK button in the UINavigationBar.
The same happens when I drag the left side of the screen to the right (triggers the BACK behaviour).
With some good debugging I noticed out that the scroll view wasn't scrolling during the "Back" transition. It was just part of the left pages that were visible during the transition.
So with a simple [scrollView clipsToBounds] the problem was solved :).

Resources