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
0
votes
1 answer

Trying to code a short intro for my app

I'm trying to code a short intros for my first app. Here is my code: import UIKit class ViewController: UIViewController, UIScrollViewDelegate { var MainscrollView = UIScrollView() override func viewDidLoad() { super.viewDidLoad() …
Michele A.
  • 11
  • 3
0
votes
0 answers

UITableView inside a UIScrollView not responding to swipe events

My question is similar to a bunch of questions on stackoverflow (eg. swipe to delete in a UITableView which is embeded in a UIScrollView) I need to implement a swipe action on a table view cell for a tableview controller which is a custom view…
ssarangi
  • 602
  • 1
  • 10
  • 28
0
votes
1 answer

UIScrollViewDelegate Not Being Called in Custom Class

When I instantiate and add a scroll view to my self.view in my ViewController class and set the scroll view's delegate to self, the delegate functions get called. As written below: class ViewController: UIViewController, UIScrollViewDelegate { …
aejhyun
  • 612
  • 1
  • 6
  • 19
0
votes
1 answer

How to allow UIScrollView to scroll below content offset 0?

I'm using UIScrollView to create recording timeline just like Voice Memo app. This is horizontal scrollview's frame at the beginning. I use CAShapeLayer to draw bars. scrlViewBars.frame = CGRectMake(0, scrlViewBars.frame.origin.y, SCREEN_WIDTH,…
0
votes
1 answer

scrollViewDidLoad called multiple time while implementing infinite scroll

Im trying to implement infinite scroll on a collection view which has a custom layout. after search I found this method: override func scrollViewDidScroll(_ scrollView: UIScrollView) { //make sure collection view is on screen if…
0
votes
1 answer

Get direction UIWebView is scrolling

Hey! I need to find a way to keep my page's bounce scrolling looking good. Here's what I need: When the user scroll past a UIWebViews scrollable area (top), the background color of the view should be set to [UIColor colorWithRed:0.839 green:0.871…
Hank Brekke
  • 2,024
  • 2
  • 24
  • 33
0
votes
1 answer

Swift 2 collection view extension for horizontal scroll to vertical

I've got this extension for my collection view that makes horizontal scroll but I want to change it on vertical scroll?? extension viewRe : UIScrollViewDelegate { func scrollViewWillEndDragging(scrollView: UIScrollView, withVelocity velocity:…
0
votes
4 answers

asynchronous image downloading in tabelviewcell?

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"cell"; TVcell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell…
0
votes
0 answers

UITextView is scrolling even when contentSize is CGSizeZero when isEditable and isSelectable

I am editing in UITextView, and do not want it to scroll, but respond to touch events. Even after I have set the contentSize to CGSizeZero, it gets reset to a different frame. Can someone help with this?
0
votes
2 answers

What is difference between scrollViewWillBeginDecelerating: and scrollViewDidEndDragging:willDecelerate:?

scrollViewWillBeginDecelerating: delegate method is called on finger up as it is moving.(from UIScrollView.h) But, scrollViewDidEndDragging:willDecelerate: delegate method is also called when same state. (called on finger up if the user dragged.…
strawnut
  • 359
  • 5
  • 21
0
votes
1 answer

Issue forwarding UIScrollViewDelegate calls

I ran into a weird issue. I have a custom composant that handles the layout of a UICollectionView for me. That code is written in Swift. class MyCustomCollectionViewHandler: NSObject { let collectionView: UICollectionView weak var…
0
votes
1 answer

How to add a UIImageVIew in UIScrollView Programatically in iOS?

In my application I want to display a images in UIScrollview. Here I'm not getting the scrollview height and width as image height and width.How to get scrollview(Hight,Width) to my image view(height and width)? Here is upto now I had tried. for…
User558
  • 1,165
  • 1
  • 13
  • 37
0
votes
0 answers

Why does this ScrollableImageView won't work?

I've trying to create my own ScrollableImageView like this: @interface ZoomableImageScrollView : UIScrollView @property (strong, nonatomic) UIImageView *imageView; - (void)setImage:(UIImage *)image; @end @implementation…
Eddie
  • 1,903
  • 2
  • 21
  • 46
0
votes
2 answers

error when i add UIScrollViewDelegate to UItableviewController swift

i get an error when i add UIScrollViewDelegate with UITableViewController so i tried every thing i know but nothing worked ` import UIKit class TableViewController: UITableViewController, UIScrollViewDelegate { help me (sorry for my bad english)
devzaid
  • 35
  • 2
  • 13
0
votes
1 answer

how to response to touchupinside event in a UIScrollView?

I have a UIScrollView in the centre of the whole view which is separated in to three parts and scroll horizontally. Users can scroll the view freely and when the finger is up, i want to set one of the three parts to show based on the contentoffset…
Boli-CS
  • 550
  • 1
  • 5
  • 14