Re: Infinite Scroll View?
Re: Infinite Scroll View?
- Subject: Re: Infinite Scroll View?
- From: Dave <email@hidden>
- Date: Mon, 07 Oct 2013 18:25:34 +0100
Hi,
I don't think that will work for me in this case as I need the images to be scrolled smoothly without gaps and AFAIK, using a table view cell will cause a gap - you can add a fragment of an image.
Thanks anyway
All the Best
Dave
On 7 Oct 2013, at 18:11, Steve Christensen <email@hidden> wrote:
> Have you thought about representing your images as cells in a UITableView? If so, you could use something like BBTableView (https://github.com/bharath2020/UITableViewTricks). It's a subclass of UITableView lays out cells along an arc but it also has support for infinite scrolling, so you could just use the relevant pieces. Plus UITableView will handle putting the right image in the right vertical location, based on your data source.
>
>
> On Oct 7, 2013, at 9:21 AM, Dave <email@hidden> wrote:
>
>> Hi,
>>
>> I'd like to be able to Scroll Infinitely in a Scroll, e.g. when the scrolling is past the last item in the Scroll start displaying the first and when scrolling before the first item, starting displaying the last. The items in this case are UIImageViews and they have a fixed height and a variable width and no one image will be wider that the Scroll View itself. Also it needs to work with pagingEnables = NO, e.g. there will be more than one Image visible.
>>
>> I've playing around a bit and found a some sample code that sort of does it but it doesn't handle the wrapping the Images smoothly (is was written to have paging enabled).
>>
>> My plan was/is to detect when the scrolling had hit before the first/after the last and to move the first Subview to the End or the Last one to the beginning, depending on the direction of movement, but at the moment, I can't seem to see a way of detecting these conditions.
>>
>> I logged contentOffset and contentSize in the scrollViewDidScroll delegate method and got these results:
>>
>>
>> scrollViewDidScroll Offset: {4017, 0} - Size: {5119, 200}
>> scrollViewDidScroll Offset: {4061, 0} - Size: {5119, 200}
>> scrollViewDidScroll Offset: {4095, 0} - Size: {5119, 200}
>>
>> When hitting the end and
>>
>> scrollViewDidScroll Top Scroll View Offset: {106, 0} - Size: {5119, 200}
>> scrollViewDidScroll Top Scroll View Offset: {24, 0} - Size: {5119, 200}
>> scrollViewDidScroll Top Scroll View Offset: {-0, 0} - Size: {5119, 200}
>>
>> When hitting the start.
>>
>> I'm not sure how if I can detect the start/end conditions using these values?
>>
>> Any points on the best way to implement this would greatly appreciated!
>>
>> All the Best
>> Dave
>
_______________________________________________
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