Questions tagged [uiscrollviewdelegate]

The methods declared by the UIScrollViewDelegate protocol allow the adopting delegate to respond to messages from the UIScrollView class and thus respond to, and in some affect, operations such as scrolling, zooming, deceleration of scrolled content, and scrolling animations.

The methods declared by the UIScrollViewDelegate protocol allow the adopting delegate to respond to messages from the UIScrollView class and thus respond to, and in some affect, operations such as scrolling, zooming, deceleration of scrolled content, and scrolling animations. On UIScrollViewDelegate, you can find the following methods:

Responding to Scrolling and Dragging:

– scrollViewDidScroll:

– scrollViewWillBeginDragging:

– scrollViewWillEndDragging:withVelocity:targetContentOffset:

– scrollViewDidEndDragging:willDecelerate:

– scrollViewShouldScrollToTop:

– scrollViewDidScrollToTop:

– scrollViewWillBeginDecelerating:

– scrollViewDidEndDecelerating:

Managing Zooming:

– viewForZoomingInScrollView:

– scrollViewWillBeginZooming:withView:

– scrollViewDidEndZooming:withView:atScale:

– scrollViewDidZoom:

Responding to Scrolling Animations:

– scrollViewDidEndScrollingAnimation:
398 questions
13
votes
5 answers

UIScrollView scrollRectToVisible:animated: is there a way that a method can be called when animation ends

Is there a way to know when the animation has end and uiscrollview has come to rest.
user689751
12
votes
4 answers

Why does UIScrollView scroll violently when I quickly swipe twice in the same direction?

when scrolling horizontally in a UIScrollview, if I quickly swipe twice in the same direction the scroll view jumps violently. Is there anyway to prevent this from happening? To explain in detail, here's an event log from the scrollview where in…
Mic
  • 6,741
  • 3
  • 24
  • 25
11
votes
2 answers

scrollViewDidEndDecelerating being called for a simple touch

I'm implementing UIScrollViewDelegate and doing a lot of stuff with it. However, I just found an annoying issue. I expect scrollViewDidEndDecelerating: to be called always after scrollViewWillBeginDecelerating:. However, if I simply touch my…
LocoMike
  • 5,626
  • 5
  • 30
  • 43
11
votes
5 answers

scrollViewDidScroll delegate is invoking automatically

I am using scrollViewDidScroll delegate in my application. But, many times, even though I dint start scrolling, this delegate is getting invoked which is creating a lot of problem. I heard that even when contentSize for a particular scroll view is…
Bharath
  • 3,001
  • 6
  • 32
  • 65
10
votes
2 answers

Objective C switch statements and named integer constants

I have a controller which serves as a delegate to two scrollviews which are placed in view managed by aforementioned view controller. To distinguish between two scroll views I'm trying to use switch statement (instead of simple pointer comparison…
Eimantas
  • 48,927
  • 17
  • 132
  • 168
9
votes
4 answers

Pager Sliding TabStrip in ios

I would like to use Pager Sliding TabStrip in my project.Pager Sliding Tapstrip is there for android. Can we define like this? I have taken one scroll view, added subviews on it for tables and take one uivew, added buttons as subviews and added…
Prasad G
  • 6,702
  • 7
  • 42
  • 65
9
votes
1 answer

Cancel current UIScrollView touch

I have an UIScrollView with a few subviews and so on. I am also the scrollView's delegate and have implemented the - (void)scrollViewDidScroll:(UIScrollView *)scrollView. Underneath my scroll there is another view. I want to show that view if the…
Majster
  • 3,611
  • 5
  • 38
  • 60
8
votes
2 answers

UIScrollView on tvOS

The question is very simple, how to enable scroll and zoom inside a UIScrollView in tvOS? I tried the same initializer code from iOS and returned the scrollview for the focusedView var, but nothing happens when i touch the remote. Also, i tried to…
8
votes
0 answers

UIScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset getting called with pagingEnabled = YES

According to Apples documentation (and numerous other places), UIScrollViewDelegate:scrollViewWillEndDragging:withVelocity:targetContentOffset does not get called if UIScrollView.pagingEnabled is set to YES. On iOS6 this appears to be true, however,…
Jordan
  • 4,133
  • 1
  • 27
  • 43
8
votes
2 answers

Detecting the bottom "bounce" of UITableView

I have a table view that performs an animation when the user scrolls down on a UITableView (push thumb up) and a different animation when the user scrolls up (Push thumb down) on a UITableView. The problem is when the user reaches the bottom of a…
Kyle Begeman
  • 7,169
  • 9
  • 40
  • 58
8
votes
2 answers

UIScrollView inside of UIScrollView?

Similar questions have been asked to this, but my predicament is actually the opposite of theirs. I've got a fullscreen, paging UIScrollView, with each page being the size of the screen. Inside of that, I've got some pages that are themselves…
puzzl
  • 833
  • 9
  • 19
8
votes
3 answers

iOS. How do I restrict UIScrollview scrolling to a limited extent?

What is the best way to set limits on the left/right scrolling of a UIScrollView. I would have thought this would be easy but all my attempts have been unsuccessful. So, to be clear, I need a solution that will allow me to programmatically limit the…
dugla
  • 12,774
  • 26
  • 88
  • 136
7
votes
4 answers

UIScrollView detect pinch zoom end

I'm trying to get notified when UIScrollView is pinch zoomed out beyond its minimum zoom limit and is about to animate back, but I'm finding it very difficult. Is there a way I can do this with delegate methods alone or do I need to override…
Nick
  • 3,958
  • 4
  • 32
  • 47
7
votes
3 answers

Updating targetContentOffset in scrollViewWillEndDragging to a value in wrong direction does not animate

I am setting a new value to targetContentOffset in scrollViewWillEndDragging(_:withVelocity:targetContentOffset:) to create a custom paging solution in a UITableView. It works as expected when setting a coordinate for targetContentOffset that is in…
Sunkas
  • 9,542
  • 6
  • 62
  • 102
7
votes
1 answer

Cannot specialize non-generic type 'UIViewController'

I am trying to use UIScrollViewDelegate: class ViewController: UIViewController {} But I have error: Cannot specialize non-generic type 'UIViewController'
Nikita Zernov
  • 5,465
  • 6
  • 39
  • 70
1
2
3
26 27