All Projects → Ramotion → Circular Carousel

Ramotion / Circular Carousel

Licence: mit
List a collection of items in a horizontally scrolling view. A scaling factor controls the size of the items relative to the center.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Circular Carousel

Animated Tab Bar
RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
Stars: ✭ 10,904 (+2111.76%)
Mutual labels:  library, material-design
Wallpaperboard
Android Json based wallpaper dashboard library
Stars: ✭ 235 (-52.33%)
Mutual labels:  library, material-design
Garland View Android
≡ GarlandView seamlessly transitions between multiple lists of content. Made by @Ramotion
Stars: ✭ 1,855 (+276.27%)
Mutual labels:  library, material-design
Smartmaterialspinner
The powerful android spinner library for your application
Stars: ✭ 108 (-78.09%)
Mutual labels:  library, material-design
Aestheticdialogs
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (-28.6%)
Mutual labels:  library, material-design
Folding Cell
📃 FoldingCell is an expanding content cell with animation made by @Ramotion
Stars: ✭ 10,035 (+1935.5%)
Mutual labels:  library, material-design
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (-55.17%)
Mutual labels:  library, material-design
Wymaterialbutton
Interactive and fully animated Material Design button for iOS developers.
Stars: ✭ 80 (-83.77%)
Mutual labels:  library, material-design
Android Floatingtutorialactivity
A light-weight, easy-to-implement, and easy-to-look-at way to do a tutorial pager or dialog on Android
Stars: ✭ 346 (-29.82%)
Mutual labels:  library, material-design
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+3259.03%)
Mutual labels:  library, material-design
Kivymd
Set of widgets for Kivy inspired by Google's Material Design.
Stars: ✭ 107 (-78.3%)
Mutual labels:  library, material-design
Google Material Icons For Sketch
Google Material Icons Library for Sketch App
Stars: ✭ 420 (-14.81%)
Mutual labels:  library, material-design
Bubble Navigation
🎉 [Android Library] A light-weight library to easily make beautiful Navigation Bar with ton of 🎨 customization option.
Stars: ✭ 1,537 (+211.76%)
Mutual labels:  library, material-design
Dynamic Toasts
Custom toasts with color and icon for Android.
Stars: ✭ 132 (-73.23%)
Mutual labels:  library, material-design
Simpledialogfragments
A collection of easy to use and extendable DialogFragment's for Android
Stars: ✭ 94 (-80.93%)
Mutual labels:  library, material-design
Dynamic Support
A complete library to build Android apps with a built-in theme engine.
Stars: ✭ 218 (-55.78%)
Mutual labels:  library, material-design
Matter
Material Design Components in Pure CSS. Materializing HTML at just one class per component 🍰
Stars: ✭ 888 (+80.12%)
Mutual labels:  library, material-design
Bottombar
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.
Stars: ✭ 8,459 (+1615.82%)
Mutual labels:  library, material-design
Materialchipsinput
Implementation of Material Design Chips component for Android
Stars: ✭ 2,605 (+428.4%)
Mutual labels:  library, material-design
Material Calendar View
📅 Material Design Calendar compatible with API 11+
Stars: ✭ 360 (-26.98%)
Mutual labels:  library, material-design

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

CocoaPods CocoaPods Twitter

Donate

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 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 the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].