Search Results

Search found 1 results on 1 pages for 'morgan1189'.

Page 1/1 | 1 

  • Manage the scrolling of just one element in a ScrollView

    - by morgan1189
    So, I have a ScrollView which has cards on it. ScrollView must be paging enabled. The goal is that the user must be able to scroll it, even if it has only one card. Since i am having the frame of ScrollView of exactly the same width and height as a picture of a card, i decided to increase the width of a ScrollView.contentSize and add one point to it. It turns out to be working fine, but it glitches a bit - when i drag the card to the left, and then grab it again it moves to right a little bit (i guess, for the value of that one point). If i increase the contentSize, the shift increases too (for example, if the content size is increased by ten, the shift value is ten points too). It really irritates me a lot and I want to get rid of it. Any advice on how to do that? Help is much appreciated. UPD: I tried to manually re-center the card in the scrollViewDidEndDecelerating but that didn't help. My guess for now is that the problem can be solved by setting the content offset to the right value (because now it's (0,0)), but I can't figure out how to do it.

    Read the article

1