Comments (2)
Hi Zoe,
iCarousel has a delegate method:
- (CATransform3D)carousel:(iCarousel *)carousel transformForItemView:(UIView *)view withOffset:(CGFloat)offset;
This lets you supply your own 3D transform to apply to each view to get whatever effect you want, without needing to rewrite any of the library. The Example project demonstrates doing this to create the "custom" carousel, which is not in the standard library.
To create a cylindrical carousel like the one you describe, just copy the cylindrical carousel code from inside the library, stick it in the delegate method above and then tweak it to get the effect you want. It should be fairly simple.
If you have hundreds of items, you will also want to implement:
- (NSUInteger)numberOfVisibleItemsInCarousel:(iCarousel *)carousel;
To restrict the number of views that the carousel displays simultaneously to a manageable number like 10 or 20.
If you are really struggling with it, you can hire me on a contract basis to implement the carousel as you've described - it shouldn't take more than an hour or so.
Nick
On 17 Aug 2011, at 20:37, ZoeSummers wrote:
Hi
Amazing library.
I have a problem where I need to use the cylinder type carousel, with quite a wide spacing, but with a dataset of at least 200 images, maybe going into the thousands.
I need to use the cylinder because of all of them it has the most affordance for swiping for non iOS friendly users.
However, I don't need the ones at the rear of the carousel to show all of them - therefore making the diameter of the cylinder larger than it is with just the sample demo size of 21, but I do need that an item gets to the very back, it doesn't start to come back around until it really should.
Not sure if I'm being clear enough, but lets say the cylinder holds 21 visible items the one at the back left is 21 and the one to it's immediate right is number 1 - i.e. it's wrapping and we're probably looking at 10 or 11 at the 'front'.
However, with a large data set of 1000, if I'm looking at 500 at the front, the rear left will be 511 and the rear right will be 489, so with the next swipe to the left, the rear left will be 512 and the right right will be 488... but regardless of the size of the data set, the diameter of the 'cylinder' is fixed.
Is this possible without a huge re-write of the icarousel.m code? Or have I missed the forrest for the trees and it's must more simple and elegant?
Thanks so much for this library (and your others) and I hope you find the time to help with this question.
Regards
Zoe
Reply to this email directly or view it on GitHub:
https://github.com/demosthenese/iCarousel/issues/34
from icarousel.
Thank you for your prompt response...
That's great info and I'll take a look at that.
If you want to contact me directly about your final suggestion, please can you email me at zoe AT me DOT com
Thanks Nick.
from icarousel.
Related Issues (20)
- ICarousel Accessibility Inspector return incorrect UI element location for Mac
- constraints attribute? for optimizing for device size?
- Crash report from Fabric
- Carousel like glidejs.com
- An unwanted view is displaying first time when we scroll slowly as a background shadow
- How to install
- Can you expose the previousItemIndex
- Spacing between items HOT 1
- Swift Package Manager Support
- On UIButtonClicked Change UIView at particular indexpath in iCarousel
- iCarouselTypeRotary type number of visual images invalid setting
- iCarouselTypeRotary type number of visual images setting invalid
- Carousel inside reusable UITableViewCell, carousel views shuffled
- iOS 13 deprecate in iCarousel.m new warnings due to use of old animation method
- tvos icarousel
- On apps running on Mac OS with Catalyst to move between different item you can't use trackpad gesture but need to press and drag HOT 1
- Delegate and Datasource should be weak? HOT 1
- Cycling custom type animation
- Swift Package Manager support issue
- Scrollable carousel view accessibility Id is not working.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from icarousel.