All Questions
Tagged with iphone uiscrollview
3,219
questions
229
votes
22
answers
140k
views
Stop UIWebView from "bouncing" vertically?
Does anyone know how to stop a UIWebView from bouncing vertically? I mean when a user touches their iphone screen, drags their finger downwards, and the webview shows a blank spot above the web page I ...
198
votes
24
answers
170k
views
Finding the direction of scrolling in a UIScrollView?
I have a UIScrollView with only horizontal scrolling allowed, and I would like to know which direction (left, right) the user scrolls. What I did was to subclass the UIScrollView and override the ...
190
votes
17
answers
141k
views
Get UIScrollView to scroll to the top
How do I make a UIScrollView scroll to the top?
172
votes
22
answers
155k
views
How to detect when a UIScrollView has finished scrolling
UIScrollViewDelegate has got two delegate methods scrollViewDidScroll: and scrollViewDidEndScrollingAnimation: but neither of these tell you when scrolling has completed. scrollViewDidScroll only ...
140
votes
25
answers
197k
views
How to automatically size UIScrollView to fit the content
Is there a way to make a UIScrollView auto-adjust to the height (or width) of the content it's scrolling?
Something like:
[scrollView setContentSize:(CGSizeMake(320, content.height))];
136
votes
27
answers
148k
views
UIScrollView not scrolling
I have a UIScrollView which contains many UIImageViews, UILabels, etc... the labels are much longer that the UIScrollView, but when I run the app, I cannot click and scroll down...
Why might this be?
...
100
votes
14
answers
72k
views
Getting the current page
In my scroll view, I want to get the current page that's being displayed (maybe page isn't the correct term). I can't find any variable that holds this. But I think it must be held somewhere, since ...
95
votes
18
answers
66k
views
how do I use UIScrollView in Interface Builder?
While I've used UIScrollView successfully in the past by manipulating it programmatically, I'm having trouble getting it to work by setting it up exclusively in Interface Builder.
I have a simple "...
91
votes
14
answers
116k
views
How can I programmatically force-stop scrolling in a UIScrollView?
Note: The answer given here doesn't work for me.
I have a UIScrollView (not a table view, just a custom thing), and when the user takes certain actions, I want to kill any scrolling (dragging or ...
91
votes
6
answers
67k
views
Check if a UIScrollView reached the top or bottom
Is there a way to know if a UIScrollView has reached the top or bottom? Possibly in the method:
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView
willDecelerate:(BOOL)...
89
votes
13
answers
113k
views
Disabling vertical scrolling in UIScrollView
There is an option in IB to uncheck vertical scrolling on a scrollview, but it doesnt seem to work.
How can the scrollview be set to only scroll horizontally, and not vertically in the code rather ...
88
votes
12
answers
47k
views
UIScrollView horizontal paging like Mobile Safari tabs
Mobile Safari allows you to switch pages by entering a sort of UIScrollView horizontal paging view with a page control at the bottom.
I am trying to replicate this particular behavior where a ...
87
votes
4
answers
44k
views
View frame changes between viewWillAppear: and viewDidAppear:
I have discovered a strange behavior in my application, where a connected IBOutlet has its connected view's frame between the calls in my view controller to viewWillAppear: and viewDidAppear:. Here is ...
84
votes
11
answers
46k
views
Can I use a UIRefreshControl in a UIScrollView?
I have about 5 UIScrollView's already in my app which all load multiple .xib files. We now want to use a UIRefreshControl. They are built to be used with UITableViewControllers (per UIRefreshControl ...
82
votes
10
answers
57k
views
Detecting UIScrollView page change
Is there a way to detect or get a notification when user changes the page in a paging-enabled UIScrollView?
76
votes
8
answers
75k
views
Getting the visible rect of an UIScrollView's content
How can I go about finding out the rect (CGRect) of the content of a displayed view that is actually visible on screen.
myScrollView.bounds
The code above works when there's no zooming, but as soon ...
73
votes
3
answers
82k
views
How can I get the UITableView scroll position so I can save it?
Is there any way to find out which UITableViewCell is at the top of the scroll window?
I'd like to get the current scroll position so that I can save it when the app exits. When the app gets ...
70
votes
7
answers
38k
views
why UIScrollView is leaving space from top in ios 6 and ios 7
I have turned off Autolayout and viewcontroller is embedded in navigation controller.
I am using Xcode 5, Storyboard.
I don't understand why is it leaving space from top.
Actually in storyboard i ...
69
votes
12
answers
54k
views
Change page on UIScrollView
I have a UIScrollView with 10 pages. I am able to flick between them. I also want to have 2 buttons (a back button and a next button) which when touched will go to the previous or next page. I can't ...
69
votes
3
answers
52k
views
What does contentOffset do in a UIScrollView?
What is the use of the contentOffset property in UIScrollView?
67
votes
8
answers
64k
views
UIScrollView works as expected but scrollRectToVisible: does nothing
I have used UIScrollView before, and am using it now, and never had a problem. I'm now adding it to an old app, and while it works as expected (I can look at the contents, scroll around with my ...
67
votes
18
answers
31k
views
Keep uitableview static when inserting rows at the top
I have a tableView that I'm inserting rows into at the top.
Whilst I'm doing this I want the current view to stay completely still, so the rows only appear if you scroll back up.
I've tried saving ...
64
votes
4
answers
61k
views
How to enable zoom in UIScrollView
How do I enable zooming in a UIScrollView?
64
votes
13
answers
90k
views
calculating height of UITabBar
I'm writing an app that uses UITabBar for parts of the navigation. I'm also using UIScrollView for presenting more information than what the screen can typically handle. Because of this, I'm needing ...
63
votes
8
answers
120k
views
How to scroll UITableView to specific position
How can I scroll the table's cell to specific position ? I have a table which shows 3 rows (according to height). what I want is if I click on 1st row than according to table's height the 1st row ...
57
votes
17
answers
31k
views
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.
...
56
votes
11
answers
46k
views
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 ...
55
votes
8
answers
54k
views
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 ...
48
votes
5
answers
28k
views
Remove all the subviews from a UIScrollView?
How do I remove all of the subviews from a UIScrollview?
48
votes
6
answers
67k
views
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.
...
48
votes
4
answers
47k
views
How can I change the page on clicking the dots of UIPageControl
Here I have a pagecontrol which works good but on clicking on dot it doesn't change the page so please help in the function of changepage:
- (void)viewDidLoad {
scrollView=[[UIScrollView alloc]...
46
votes
9
answers
35k
views
Problem with uiscrollview setcontentoffset animated not scrolling when animated:yes is set
This is very odd and I'm wondering if anyone has any thoughts?
I'm trying to scroll a UIScrollView in response to a button press on the iPad.
If I do:
CGPoint currentOff = scrollView....
45
votes
11
answers
38k
views
UIScrollView custom paging size
paging in UIScrollView is a great feature, what I need here is to set the paging to a smaller distance, for example I want my UIScrollView to page less size that the UIScrollView frame width.
Thanks
44
votes
14
answers
44k
views
How to Zoom In/Out Photo on double Tap in the iPhone WWDC 2010 - 104 PhotoScroller
I am going through the Sample code of iPhone WWDC 2010 - 104 PhotoScroller App.
It's working great with my project related images (PDF Page Images)
but I am struggling detect touches in the ...
43
votes
8
answers
49k
views
UIScrollView adjusts contentOffset when contentSize changes
I am adjusting a detail view controller's state, just before it is pushed on a navigationController:
[self.detailViewController detailsForObject:someObject];
[self.navigationController ...
42
votes
14
answers
27k
views
Scrolling with two fingers with a UIScrollView
I have an app where my main view accepts both touchesBegan and touchesMoved, and therefore takes in single finger touches, and drags. I want to implement a UIScrollView, and I have it working, but it ...
40
votes
8
answers
43k
views
iPhone UIScrollView Speed Check
I know how to get the contentOffset on movement for a UIScrollView, can someone explain to me how I can get an actual number that represents the current speed of a UIScrollView while it is tracking, ...
40
votes
4
answers
33k
views
Deactivate UIScrollView decelerating
Is there a way to deactivate the decelerating of a UIScrollView?
I want to allow the user to scroll the canvas, but I don't want that the canvas continues scrolling after the user lifted the finger.
40
votes
5
answers
36k
views
iphone - prevent uiscrollview from scrolling by touch
I've a scrollview and on both sides, I've two buttons left and right.
when i click the scroll view will move left and when right button is clicked it will move right side. My scrollview has 20 ...
40
votes
13
answers
50k
views
How to make a UIScrollView auto scroll when a UITextField becomes a first responder
I've seen posts around here that suggest that UIScrollViews should automatically scroll if a subview UITextField becomes the first responder; however, I can't figure out how to get this to work.
...
40
votes
3
answers
25k
views
How to steal touches from UIScrollView?
Today on my creative time I did some quite comprehensive research on how to steal touches from a UIScrollView and send them instantly to a specific subview, while maintaining the default behavior for ...
39
votes
12
answers
106k
views
How to set content size of UIScrollView dynamically
I got question about UIScrollview.
The story is I have a UIView named ChartsView which I re-draw it myself by override method drawRect(). The content of drawing was generated dynamically. So I do not ...
39
votes
7
answers
84k
views
How to create a UIScrollView Programmatically?
Alright, so the key here is I'm not using IB at all, because the View I'm working with is created programmatically. The UIView covers the lower half the screen, and has a bunch of buttons on it. ...
38
votes
6
answers
9k
views
UILabel updating stops during scrolling UIScrollView
I have a scrollView with an imageView inside of it. The scrollView is a subView of the superView, and the imageView is a subView of the scrollView.
I also have a label (at the super-view level) that ...
38
votes
11
answers
40k
views
UIScrollView with centered UIImageView, like Photos app
I would like to have scroll view with an image content view. The image is actually map which is much bigger than the screen. The map should be initially in the center of the scroll view, like photos ...
37
votes
3
answers
67k
views
Learning the basics of UIScrollView
I've been having a very hard time finding good examples of UIScrollView. Even Apple's UIScrollView Suite I find a bit lacking.
I'm looking for a tutorial or example set that shows me how to create ...
36
votes
9
answers
21k
views
UIScrollView EXC_BAD_ACCESS crash in iOS SDK
I have an iPhone SDK application that has several views that appear and disappear as the user creates content. After using the application on a device for a while, I get the following crash:
Program ...
36
votes
1
answer
30k
views
Horizontal UIScrollView inside a UITableViewCell
I'm trying to create the exact same effect as in the AppStore app for viewing screenshots: inside a UITableView, I have custom subclasses of UITableViewCell's. One of them is designed to show previews ...
35
votes
5
answers
12k
views
Handling touches for nested UIScrollViews scrolling in the same direction
I have two nested UIScrollViews, both scrolling in the vertical direction. I need the outer scrollview to scroll to it's max range first before allowing the inner scrollview to scroll. The inner ...
34
votes
13
answers
44k
views
Why is UIScrollView leaving space on top and does not scroll to the bottom
I am new to objective-C programming.
I am using UIScrollView with some labels, image and text view on it.
I have turned off Autolayout and already tried with "Adjust scroll View Insets" on (...