Coder Social home page Coder Social logo

rajeshm20 / categorysliderview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cemolcay/categorysliderview

0.0 2.0 0.0 349 KB

slider view for choosing categories. add any UIView type as category item view. Fully customisable

License: MIT License

Ruby 26.77% Objective-C 73.23%

categorysliderview's Introduction

CategorySliderView

Horizontal or vertical slider view for choosing categories. Add any UIView type as category item view. Fully customisable

Demo

alt tag

Install

Manual
Copy CategorySliderView.h/m files into your project.

CocoaPods

    source 'https://github.com/CocoaPods/Specs.git'
    pod 'CategorySliderView', '~> 1.0.2'

Usage

UILabel *category1 = ......
UILabel *category2 = ......
UILabel *category3 = ......
...

CategorySliderView *sliderView = [[CategorySliderView alloc] initWithSliderHeight:60 andCategoryViews:@[category1, category2, category3] categorySelectionBlock:^(UIView *categoryView, NSInteger categoryIndex) {
    UILabel *selectedView = (UILabel *)categoryView;
    NSLog(@"\"%@\" cateogry selected at index %d", selectedView.text, categoryIndex);
}];
[self.view addSubview:sliderView];

you can add as many items as you want

UIView *newCategoryView = .....
[sliderView addCategoryView:newCategoryView];

Optional Properties

shouldAutoScrollSlider: scrolls to closest category item after dragging ends
shouldAutoSelectScrolledCategory: selects the closest category item after dragging ends
categoryViewPadding: padding between category item views
backgroundImage: background image for slider

categorysliderview's People

Contributors

cemolcay avatar readmecritic avatar

Watchers

James Cloos avatar Rajesh Mani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.