Questions tagged [uiscrollview]

Use this tag for all questions about scroll views on iOS. Do NOT use this tag for other platforms.

UIScrollView is the native scroll view system in iOS. It is part of Cocoa and UIKit. A number of other very common iOS classes, such as UITableView, are based on UIScrollView. UIScrollViewDelegate is the associated delegate.

Full Apple documentation for UIScrollView is at the usual Apple documentation site. It is on the internet. It can be found at https://developer.apple.com/reference/uikit/uiscrollview.

Use this tag only for the specific, iOS, UIScrollView class. For the native scroll views in other specific platforms, such as Android, use those tags.

If you genuinely have a rare, non-platform-specific, general conceptual question about scroll views, you could use the otherwise totally worthless tag.

12500 questions
58
votes
17 answers

UIScrollView's origin changes after popping back to the UIViewController

I have a UIViewController subclass as a scene in the storyboard that contains a UIScrollView containing various subviews. One of the subviews is a UIButton which segues into another scene UIViewController subclass. When I come back from the view…
Peter Jacobs
  • 1,657
  • 2
  • 13
  • 29
57
votes
17 answers

Large Text Being Cut Off in UITextView That is Inside UIScrollView

I'm having a serious problem that I just can't seem to fix and it's driving me insane for the last two days. I have searched far and wide and I can't find a solution, even though I have tried many. I have a UITextView inside a UIScrollView. I am…
sudo
  • 1,648
  • 1
  • 20
  • 22
57
votes
5 answers

Programmatically Linking UIPageControl to UIScrollView

I am making a simple slideshow view within my app. I'd like to link my UIPageControl to my UIScrollView. This shouldn't be too difficult, but I haven't been able to find a simple solution anywhere. Below is my code. HelpViewController.h #import…
Dan Carew
  • 687
  • 1
  • 5
  • 6
56
votes
11 answers

UIScrollView - showing the scroll bar

Possibly a simple one! Does anyone know how to get the scroll bar of a UIScrollView to constantly show? It displays when the user is scrolling, so they can see what position of the scroll view they are in. BUT I would like it to constantly show…
Tom G
  • 999
  • 2
  • 10
  • 23
55
votes
8 answers

UIScrollView image/photo viewer with paging enabled and zooming

OK, I think it's time to make an official place on the internet for this problem: How to make a UIScrollView photoviewer with paging and zooming. Welcome my fellow UIScrollView hackers. I have a UIScrollView with paging enabled, and I'm displaying…
Mike Weller
  • 45,401
  • 15
  • 131
  • 151
55
votes
9 answers

Disabling automatic scrolling of UITableView when editing UITextField inside UITableViewCell

I'm using custom UITableViewCells inside my UITableView. Each of these UITableViewCells is pretty high and contains a UITextField at the top. When a user taps the UITextField in order to edit it, a keyboard appears and the UITableView scrolls…
animal_chin
  • 6,610
  • 9
  • 37
  • 41
53
votes
3 answers

UIWorkIntervalTiming workIntervalStart

Getting console log while scrolling ScrollView. Is there way to remove this? 2019-03-27 12:33:34.109573+0530 MyApp[10465:46241] [UIWorkIntervalTiming] workIntervalStart: startTimestamp > targetTimestamp; rolling forward by 1.116667
SPatel
  • 4,768
  • 4
  • 32
  • 51
52
votes
1 answer

ScrollView has ambiguous scrollable content height

I am making a very basic UIScrollView test. Here is my setup It shows me the following AutoLayout error: ScrollView has ambiguous scrollable content height
Madu
  • 4,849
  • 9
  • 44
  • 78
51
votes
7 answers

When does a UITableView's contentSize get set?

I have a non scrolling UITableView in a UIScrollView. I set the frame size of the UITableView to its content size. When I add a row to the UITableView, I call insertRowsAtIndexPaths:withRowAnimation: on the UITableView. Then I call a method to…
Darren
  • 10,091
  • 18
  • 65
  • 108
49
votes
13 answers

How to get UIScrollView vertical direction in Swift?

How can I get the scroll/swipe direction for up/down in a VC? I want to add a UIScrollView or something else in my VC that can see if the user swipes/scrolls up or down and then hide/show a UIView depending if it was an up/down gesture.
user2722667
  • 8,195
  • 14
  • 52
  • 100
48
votes
6 answers

How do I scroll to a position programmatically in UIScrollView

I have a scroll view which scrolls horizontally. I just added images, labels and a webview in it and there are many objects in it. I want to directly scroll to the first object in the scroll view. How do I do this?
user1072740
  • 660
  • 1
  • 6
  • 10
48
votes
6 answers

Callbacks When an NSScrollView is Scrolled?

I'm making a Mac app which needs to know when the user is scrolling the NSScrollView, however, I can't find any methods like UIScrollView, which has the following delegate methods: – scrollViewDidScroll: – scrollViewWillBeginDragging: –…
nonamelive
  • 6,510
  • 8
  • 40
  • 47
48
votes
5 answers

Remove all the subviews from a UIScrollView?

How do I remove all of the subviews from a UIScrollview?
Moshe
  • 57,511
  • 78
  • 272
  • 425
48
votes
9 answers

How to implement horizontally infinite scrolling UICollectionView?

I want to implement UICollectionView that scrolls horizontally and infinitely?
48
votes
9 answers

How to detect when UIView size is changed in swift ios xcode?

I am trying some stuffs out with CATiledLayer inside UIScrollView. Somehow, the size of UIView inside the UIScrollView gets changed to a large number. I need to find out exactly what is causing this resize. Is there a way to detect when the size of…
Joon. P
  • 2,238
  • 7
  • 26
  • 53