Questions tagged [contentoffset]

The point at which the origin of the content view is offset from the origin of the scroll view.

140 questions
1
vote
1 answer

How To Move scrollview(horizontal) based on In its subview position

I am adding a series of buttons to my scrollview,So on clicking button I want to highlight that one and deselect remaining all. So every thing Works fine. But i need one more behaviour like if Second button is highlighted I want to show some part…
siva krishna
  • 1,149
  • 2
  • 15
  • 23
1
vote
0 answers

Animate scrollTop can't get the right $('header').outerHeight() to discount to offset() at first click

I have a header with navigation:
1
vote
2 answers

iOS UITableView content offset not working in iOS7

In my app I have a search bar in the header of myUITableView. I tried to set the content offset to my UITableView for hiding the search bar but it is giving me some problems. Finally I solved like this: - (void)viewWillAppear:(BOOL)animated { …
user3065901
  • 4,678
  • 11
  • 30
  • 52
1
vote
1 answer

iOS moving tapped point on View within ScrollView to the center of screen

I have an UIView(0,0,1000,1000) within an UIScrollView(0,0,500,500) as the UIScrollView's content, here's my code: //ScrollView setting ScrollView.minimumZoomScale = 0.5; ScrollView.maximumZoomScale = 1.0; ScrollView.contentSize =…
bluenowhere
  • 2,683
  • 5
  • 24
  • 37
1
vote
0 answers

Getting UICollectionView contentOffset in UIScrollViewDelegate method

I am encountering a strange issue that I've never seen before. I am trying to perform some math in the scrollViewDidEndDragging method, using the contentOffset of the UICollectionView. However, the contentOffset is being returned as {0,0}. For…
1
vote
0 answers

UIScrollView's contentOffset being reset when clicking anywhere

I have an introduction sliding view pager type in my iOS app, and the last page has two text inputs. There are 7 pages being displayed in a scrollview that swipes left to right, so on the last page when the keyboard appears, I am having the…
Jake Weso
  • 555
  • 1
  • 6
  • 14
1
vote
1 answer

UIScrollView and Autolayout: ContentOffset is changing but content view is not moving

I have been trying to implement autolayout on a UIScrollView but have been struggling. Here is a description of my main view, from top to bottom: Navigation bar -> Scroll View -> UITextField, all of which stretch horizontally across the screen. Here…
Benny B
  • 357
  • 1
  • 3
  • 13
1
vote
1 answer

UITableView get middle position via content offset

I want to add a little button in the bottom right corner of a UITableView. When we are in the top half of the tableview, the button programmatically scrolls you to the bottom, and when you are in the bottom half, it takes you to the top. And the…
nflacco
  • 4,972
  • 8
  • 45
  • 78
1
vote
1 answer

iOS Autolayout animation resetting contentOffset of UIScrollview

I'm trying to use auto layout with a {320,116} UIScrollView, with a content view of {960, 116}. I have made it so that the scroll view expands or collapses in height when the user scrolls up or down, and horizontal scrolling is paged (so, a total of…
funct7
  • 3,407
  • 2
  • 27
  • 33
1
vote
1 answer

Horizontal-only pinch zoom in a UIScrollView

I'm using a UIPinchGestureRecognizer to adjust the width (not the height) of a view in a UIScrollView. It works with the pinch gesture's scale property, but the contentOffset of the scrollview doesn't change, so the view always increases on the…
Jason Moore
  • 7,169
  • 1
  • 44
  • 45
1
vote
1 answer

How does contentOffset and contentInset work for UIScrollView in iOS 7?

This is my understanding about UIScrollView (iOS 7): contentOffset defines the point of origin of the content view contentInset effectively can add "padding" around the content view In Xcode, I created a single-view application. In IB, I added a…
applegal
  • 25
  • 1
  • 5
1
vote
4 answers

UIScrollView not scrolling to bottom in iOS 7

In this following code example self.contentView refers to the UIScrollView in question. // Scroll to bottom. CGPoint bottomOffset = CGPointMake(0, self.contentView.contentSize.height - …
Awesome-o
  • 2,002
  • 1
  • 26
  • 38
1
vote
1 answer

anchors navigation with stick to top menu... need to add dynamic offset to anchor

I have a problem with my menu and my navigation based on #anchors. I'm using a JS function to sick my menu to top when scrolling (#stickyheader). there's a div upon my menu that disappear when scrolling (#unstickyheader). the height of this div is…
mmdwc
  • 1,095
  • 6
  • 27
  • 53
1
vote
3 answers

how I can know contentOffset of UITextField?

I have a UIScrollView with height - 500, have UITextFileds in position 0, 100, 200, 300, 400, 500 (1 UITextFileds, UITextFileds 2, 3 UITextFileds, UITextFileds aUITextFileds 4 and 5). ContentOffset is in the position (0, 70). I click on the…
1
vote
1 answer

contentOffset resets at the end of UIScrollView zoom

I am doing something that seems like it should be really simple, but I am seeing strange results that I have not been able to understand. I have a UIImageView inside of (and the size of) a UIScrollView, which is the size of the iOS device it is…