Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reduce the speed of iCarousel View?

I've a icarousel view in my app, how can I reduce the speed this carousel? I mean I want to reduce the speed of the skipping from one element to another element of the carousel view.

Thanks!

like image 872
Gobinath Ed Avatar asked Nov 21 '25 03:11

Gobinath Ed


2 Answers

There are constant values available in: iCarousel.m file

#define MIN_TOGGLE_DURATION 0.2
#define MAX_TOGGLE_DURATION 0.4
#define SCROLL_DURATION 0.4
#define INSERT_DURATION 0.4
#define DECELERATE_THRESHOLD 0.1f
#define SCROLL_SPEED_THRESHOLD 2.0f
#define SCROLL_DISTANCE_THRESHOLD 0.1f
#define DECELERATION_MULTIPLIER 30.0f

Change this as per your requirements.

like image 85
Mrunal Avatar answered Nov 22 '25 18:11

Mrunal


from here,

Need to set this @property (nonatomic, assign) CGFloat scrollSpeed;

Doc says,

This is the scroll speed multiplier when the user flicks the carousel with their finger. Defaults to 1.0.

look into document for detailed customisation.

like image 20
Hemang Avatar answered Nov 22 '25 16:11

Hemang