Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ohsc/SCPageScrubberBar
A page scrubber bar like ibooks.
https://github.com/ohsc/SCPageScrubberBar
Last synced: 2 months ago
JSON representation
A page scrubber bar like ibooks.
- Host: GitHub
- URL: https://github.com/ohsc/SCPageScrubberBar
- Owner: ohsc
- License: other
- Created: 2013-01-06T09:30:44.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-01-06T09:13:26.000Z (about 11 years ago)
- Last Synced: 2024-10-28T16:19:01.460Z (3 months ago)
- Language: Objective-C
- Size: 219 KB
- Stars: 289
- Watchers: 21
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome - SCPageScrubberBar - A page scrubber bar like ibooks. (etc)
- awesome - SCPageScrubberBar - A page scrubber bar like ibooks. (etc)
README
# 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](https://github.com/ohsc/SCPageScrubberBar/archive/master.zip)
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`.
```ruby
pod 'SCPageScrubberBar', '~> 0.0.1'
```
## Example Usage### Basic
```objc
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
```objc
@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
```objc
// The delegate
@property (nonatomic, weak) id 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.[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ohsc/scpagescrubberbar/trend.png)](https://bitdeli.com/free "Bitdeli Badge")