So I've got a UIScrollView that has an image inside, and below that I have a webView. How can I make it so that when I scroll the webView up/down, the scroll view also scrolls up/down? Like when you scroll in Safari, the URL bar moves along with it.
Here's what I'm using:
first add the UIWebView and UIScrollView+UIimageView within an
another UIScrollVIew
disable the native scrolling of UIWebView byt iterating its subviews
disable the scrolling of the UIScrollView which consists UIImageView
by doing this way will help your cause
Related
Is there a way to make an imageView scrollable without using a UIScrollView. If I zoom my picture I can't scroll, that's what I'm trying to solve
I have a UITableView with cells. One of the cells has a full size UIWebView.
On the web view I want ONLY to enable horizontal scroll (like coverflow).
I can do that with this ansawer: https://stackoverflow.com/a/12575036/406055
But: Then the UIWebView intercepts the vertical scroll (thus without performing it). I want the vertical scroll gesture to affect the tableview, not the web view.
The idea I have is to either overlay the web view with a UIView and add gesture recognizers and then pass the gesture on to the UIWebView only if it is horizontal.
But any other suggestions is welcome too.
How can I detect if webview can't scroll vertically anymore? I have the auto scrolling method and I want to make sure it stops after the content has fully displayed.
Setup:
I have a full-screen, parent UIScrollView that has paging enabled. Then I have a small, second UIScrollView inside of the first one, with also paging enabled.
Problem:
If I swipe the second UIScrollView, it scrolls fine untill it runs out of pages, then the parent UIScrollView takes over scrolls. For example, if I am on the last page on the second UIScrollView, swipe to left, the parent UIScrollView begins to scroll to right. I tried enabling exclusiveTouch, but no change.
Question:
Is there a way if I scroll the second UIScrollView, only that will scrolls and stops, the parent UIScrollView will never move from that original swipe?
You can set scrollView.scrollEnabled = NO; when other scroll is moving. You can detect when scroll begin dragging and didScroll.
You can get everything with basic scrolling with full screen view from this one
https://github.com/zvonicek/ImageSlideshow
Trust me it really work and also work at rotating device.
I have a UISCrollview loading webviews, as the user starts scrolling to go to the next page, I need to have the the coming webpage to scroll into the screen from underneath another UIView that is stationary, I tried changing the alpha but its not really what I am looking for. how can I accomplish that?
For example, the scroll direction is top to bottom, now I have a uiview at the top of the screen which has some static data showing ( title, location, and other text labels ), and as the user scrolls down I want the content to scroll underneath the label ui view. Hope this clarifies it.
If I understand this question correctly I'd say you can't do this with a UIScrollView. Instead, you could have separate views for each UIWebView and handle the panning of one view under another with a UIPanGestureRecognizer.
Also, did you know there can be conflicts when using UIWebView's inside UIScrollView's?