GithubHelp home page GithubHelp logo

looping issue about icarousel HOT 10 CLOSED

nicklockwood avatar nicklockwood commented on May 29, 2024
looping issue

from icarousel.

Comments (10)

iBCode avatar iBCode commented on May 29, 2024 1

@chakery
Just return YES for option iCarouselOptionWrap in the delegate method - (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value, the rest return default values. That should work.

- (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value {
    switch (option) {
        case iCarouselOptionWrap:
            return YES;
            
        default:
            return value;
    }
}

from icarousel.

nicklockwood avatar nicklockwood commented on May 29, 2024

Fixed in 1.3.1

from icarousel.

jpros avatar jpros commented on May 29, 2024

Dear Nick,

How can I enable infinite scrolling?

Thx

from icarousel.

nicklockwood avatar nicklockwood commented on May 29, 2024

Return YES from the carouselShouldWrap delegate method. Check the included example app for how to use this.

Nick

(Sent from my iPhone)

On 10 Oct 2011, at 22:26, jpros [email protected] wrote:

Dear Nick,

How can I enable infinite scrolling?

Thx

Reply to this email directly or view it on GitHub:
#10 (comment)

from icarousel.

jpros avatar jpros commented on May 29, 2024

Sorry, what I want to say, is to scroll automatically, when the carousel appears, it start scrolling itself automatically.

Is that possible?

Thanks in advance
João Paulo

from icarousel.

nicklockwood avatar nicklockwood commented on May 29, 2024

There's no correct way to do this right now without modifying the library.

You could do a pretty good approximation though by telling the carousel to scroll a very large number of steps over a very long time, using the scrollByNumberOfItems:duration: method.

If you specified 2000000000 (2 billion) for both parameters, it should cause the carousel to scroll slowly and continuously for 2 billion seconds, aka 63 years.

It might not work though due to floating point precision - I've not tried it. If it doesn't, try a smaller value like a million.

Nick

(Sent from my iPhone)

On 11 Oct 2011, at 15:31, jpros [email protected] wrote:

Sorry, what I want to say, is to scroll automatically, when the carousel appears, it start scrolling itself automatically.

Is that possible?

Thanks in advance
João Paulo

Reply to this email directly or view it on GitHub:
#10 (comment)

from icarousel.

jpros avatar jpros commented on May 29, 2024

Thanks for you fast reply.

I've tried this (forgot to mention), but the acceleration was slow.

I tried 300 steps with duration equal to 300, but the acceleration was slow, and then in the middle very fast!! hehehe

Then I tried to change decelerationRate to 1.0f, and step over only to 1, but don't worked too.

Thanks,
João Paulo

from icarousel.

nicklockwood avatar nicklockwood commented on May 29, 2024

Ah, okay. The problem is the easing (acceleration curve). I'll have to
modify the carousel library to make this work the way you want.

I'll file this as a feature request for the next version.

Nick

On 11/10/2011 14:09, "jpros"
[email protected]
wrote:

Thanks for you fast reply.

I've tried this (forgot to mention), but the acceleration was slow.

I tried 300 steps with duration equal to 300, but the acceleration was slow,
and then in the middle very fast!! hehehe

Then I tried to change decelerationRate to 1.0f, and step over only to 1, but
don't worked too.

Thanks,
João Paulo

from icarousel.

jpros avatar jpros commented on May 29, 2024

Thanks Nick,

If I can do something for you, let me know.

Best regards,
João Paulo Ros

from icarousel.

chakery avatar chakery commented on May 29, 2024

@nicklockwood
hi, Nick
About infinite loops scrolling.
I did not find the carouselShouldWrap delegate.
Here are all the delegate I have found.
qq20170320-124815

pls help.
Thx.

from icarousel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.