Description
List a collection of items in a horizontally scrolling view. A scaling factor controls the size of the items relative to the center.
CAROUSEL alternatives and similar libraries
Based on the "Animation" category.
Alternatively, view CAROUSEL alternatives based on common mentions on social networks and blogs.
-
lottie-ios
An iOS library to natively render After Effects vector animations -
IBAnimatable
Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable. -
SkeletonView
β οΈ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting -
ViewAnimator
ViewAnimator brings your UI to life with just one line -
AnimatedCollectionViewLayout
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code. -
spruce-ios
Swift library for choreographing animations on the screen. -
Presentation
:bookmark_tabs: Presentation helps you to make tutorials, release notes and animated pages. -
Gemini
Gemini is rich scroll based animation framework for iOS, written in Swift. -
EasyAnimation
A Swift library to take the power of UIView.animateWithDuration(_:, animations:...) to a whole new level - layers, springs, chain-able animations and mixing view and layer animations together! -
DKChainableAnimationKit
Easy to read and write chainable animations in Swift. -
Fluid Slider
:octocat:π§ A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by @Ramotion -
Sica
:deer: Simple Interface Core Animation. Run type-safe animation sequencially or parallelly -
ChainPageCollectionView
A custom View with fancy collectionView animation -
ZoomTransitioning
ZoomTransitioning provides a custom transition with image zooming animation and swiping the screen edge. -
navigation-toolbar
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
FlightAnimator
Advanced Natural Motion Animations, Simple Blocks Based Syntax -
Garland View
:octocat: β‘ GarlandView seamlessly transitions between multiple lists of content. Swift UI library made by @Ramotion -
DSGradientProgressView
A simple animated progress bar in Swift -
SPPerspective
Widgets iOS 14 animation with 3D and dynamic shadow. Customisable transform and duration. -
TheAnimation
Type-safe CAAnimation wrapper. It makes preventing to set wrong type values. -
Walker
Each step you take reveals a new horizon. You have taken the first step today. -
Poi
Poi makes you use card UI like tinder UI .You can use it like tableview method. -
DottedProgressBar
Simple and powerful animated progress bar with dots -
Numbers Animation
Numbers animation allows you to click on different numbers and accordingly it will animate numbers in a cool way. It has a very attractive UI and is very easy to use.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of CAROUSEL or a related project?
README
CAROUSEL
List a collection of items in a horizontally scrolling view. A scaling factor controls the size of the items relative to the center.
We specialize in the designing and coding of custom UI for Mobile Apps and Websites. Stay tuned for the latest updates:
π‘π Inspired by Kevin Gautier shot
Requirements
- iOS 12.0+
- Xcode 10.2+
- Swift 5.0+
Installation
Just add the CircularCarousel
directory to your project.
or use CocoaPods with Podfile:
pod 'CircularCarousel'
or just drag and drop the CircularCarousel
directory to your project
Usage
1 Create a custom view that will be used as a carousel item. In this tutorial we will just use a blank UIView
.
2 Create a view controller or container view that handles datasource and delegate responses for the contained Carousel.
final class ContainerView : UITableViewCell, CircularCarouselDataSource, CircularCarouselDelegate {
}
2.1 Add a reference to the carousel control and the selection of a delegate and datasource to your Carousel control.
private weak var _carousel : CircularCarousel!
@IBOutlet var carousel : CircularCarousel! {
set {
_carousel = newValue
_carousel.delegate = self
_carousel.dataSource = self
}
get {
return _carousel
}
}
3 Implement the DataSource and Delegate functions. Some of the key functions are listed below.
3.1 Datasource
func numberOfItems(inCarousel carousel: CircularCarousel) -> Int {
return /* Number of carousel items */
}
func carousel(_: CircularCarousel, viewForItemAt indexPath: IndexPath, reuseView view: UIView?) -> UIView {
var view = view as? UIVIew
if view == nil {
view = UIView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
}
return view
}
func startingItemIndex(inCarousel carousel: CircularCarousel) -> Int {
return /* Insert starting item index */
}
3.2 Delegate
Select how you want the carousel to operate based on the control variables specified below :
func carousel<CGFloat>(_ carousel: CircularCarousel, valueForOption option: CircularCarouselOption, withDefaultValue defaultValue: CGFloat) -> CGFloat {
switch option {
case .itemWidth:
return /* Select item width for carousel */
/* Insert one of the following handlers :
case spacing
case fadeMin
case fadeMax
case fadeRange
case fadeMinAlpha
case offsetMultiplier
case itemWidth
case scaleMultiplier
case minScale
case maxScale
*/
default:
return defaultValue
}
}
Handle the selection of a particular carousel item :
func carousel(_ carousel: CircularCarousel, didSelectItemAtIndex index: Int) {
/* Handle selection of the selected carousel item */
}
Handle will begin scrolling :
func carousel(_ carousel: CircularCarousel, willBeginScrollingToIndex index: Int) {
}
To handle spacing between items depending on their offst from the center :
func carousel(_ carousel: CircularCarousel, spacingForOffset offset: CGFloat) -> CGFloat {
return /* Based on the offset from center, adjust the spacing of the item */
}
That's it, the Carousel is good to go!
π License
Carousel is released under the MIT license. See [LICENSE](./LICENSE) for details.
This library is a part of a selection of our best UI open-source projects.
If you use the open-source library in your project, please make sure to credit and backlink to https://www.ramotion.com/
π± Get the Showroom App for iOS to give it a try
Try this UI component and more like this in our iOS app. Contact us if interested.
*Note that all licence references and agreements mentioned in the CAROUSEL README section above
are relevant to that project's source code only.