user1724168
user1724168

Reputation:

iCarousel auto scroll effect

I have two concerns to ask.

I would like this scrolling be infinite. I do not want it to stop. I am using iCarousel

My second concern is, while time is passing, scrolling gets faster with the following code snippet. I would like to keep same speed.

-(void)viewDidAppear:(BOOL)animated
   {
     [carousel scrollByNumberOfItems:4 duration:20]
  }

Upvotes: 0

Views: 3369

Answers (3)

Vempati Pavani
Vempati Pavani

Reputation: 1

if u give negative value it moves right to left (the code like this)

- (void)viewDidLoad
    {
         [super viewDidLoad];
         carousel.type=iCarouselTypeCylinder;
         carousel.autoscroll= - 0.4;
     } 

Upvotes: 0

casillas
casillas

Reputation: 16813

With the latest version of iCarousel as of January 02, 2015, you could add the following code in your ViewDidLoad method in your Viewcontroller.

- (void)viewDidLoad
  {
    [super viewDidLoad];

    //configure carousel
     carousel.type=iCarouselTypeCylinder;
     carousel.autoscroll=0.4;

   }

Upvotes: 4

Nick Lockwood
Nick Lockwood

Reputation: 41005

Use the autoscroll property instead (just set it to the speed you want)

Upvotes: 4

Related Questions