Coder Social home page Coder Social logo

scpagescrubberbar's Introduction

SCPageScrubberBar

SCPageScrubberBar is a page scrubber bar like ibooks. SCPageScrubberBar works with iOS5.0+ and ARC.

Screenshot:

   

Getting Started

Manually

  1. Download the source from here
  2. Add all under SCPageScrubberBar/SCPageScrubberBar to your project
  3. Add QuartzCore.framework to your project
  4. Add #import "SCPageScrubberBar.h" before using it

CocoaPods

Add SCPageScrubberBar to your Podfile and pod install.

pod 'SCPageScrubberBar', '~> 0.0.1'

Example Usage

Basic

SCPageScrubberBar *scrubberBar = [[SCPageScrubberBar alloc] initWithFrame:CGRectMake(20.0f, 400.0f, 280.0f, 30.0f)];
scrubberBar.delegate = self;
scrubberBar.minimumValue = 0;
scrubberBar.maximumValue = 100;
scrubberBar.isPopoverMode = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
[self.view addSubview:scrubberBar];

SCPageScrubberBarDelegate

@required
// Return the text of main titleLabel
- (NSString*)scrubberBar:(SCPageScrubberBar*)scrubberBar titleTextForValue:(CGFloat)value;
// Return the text of sub titleLabel
- (NSString*)scrubberBar:(SCPageScrubberBar*)scrubberBar subtitleTextForValue:(CGFloat)value;
@optional
// This method will be called when a page is selected
- (void)scrubberBar:(SCPageScrubberBar*)scrubberBar valueSelected:(CGFloat)value;

Properties

// The delegate
@property (nonatomic, weak) id <SCPageScrubberBarDelegate> delegate;
// Default value is NO
@property (nonatomic, assign) BOOL alwaysShowTitleView;
// Default value is NO
@property (nonatomic, assign) BOOL isPopoverMode;

LICENSE

Copyright (c) 2013 Chao Shen. This software is licensed under the BSD License.

scpagescrubberbar's People

Contributors

ohsc avatar

Watchers

James Cloos avatar  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.