• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIScrollView Dynamic Paging Size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIScrollView Dynamic Paging Size


  • Subject: UIScrollView Dynamic Paging Size
  • From: Peng Gu <email@hidden>
  • Date: Fri, 04 Oct 2013 13:36:55 +0800

I am implementing a horizontal multi-image scrollview. The images have
variable widths, so a portion of the next imageview image also be shown on
the screen. To display the next image view correctly, I need to change the
paging size.

As this link
<http://stackoverflow.com/questions/1220354/uiscrollview-horizontal-paging-like-mobile-safari-tabs/1220605#1220605>suggests:
I set the scrollview paging enabled, and set clipsToBounds to NO; In the *
scrollViewDidEndDecelerating:* Method, I set the width of the scrollview to
the displaying image's width.

The problem is the contentOffset of the scrollview is not correctly updated
when the scrollview scrolls. For example, the width of the *page0* is 282,
and the contentoffset is (0, 0); but when I scroll to *page1* which has
width 148, the contentoffset is updated to (320, 0); then I scroll to *page2
*which has width 282, but the contentoffset is updated to (444, 0)...

Any ideas? Anyone know how scrollview update its contentoffset ?


Thanks,
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Can I create a thread with a runloop and a dispatch queue?
  • Next by Date: Re: Cocoa-dev Digest, Vol 10, Issue 633
  • Previous by thread: Re: txt file renamed to mp3, MPMoviePlayerPlaybackDidFinishReasonUserInfoKey returning 0
  • Next by thread: Re: Cocoa-dev Digest, Vol 10, Issue 633
  • Index(es):
    • Date
    • Thread