TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Dec 2014 |
Maintained by Yasuhiro Inami.
Attaches draggable scroll bar on top of original UIScrollView for iOS5+, works like a drug.
YIDragScrollBar
uses JRSwizzle to extend UIScrollView
's functionality, and does not use any private APIs. Just import the files, and all set!
#import "YIDragScrollBar.h"
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// set NO to disable dragScrollBar on each scrollView-init. defalut = YES.
// [UIScrollView setDefaultDragScrollBarEnabled:NO];
return YES;
}
Set scrollView.dragScrollBarDelegate
to detect dragScrollBar began/ended.
- (void)viewDidLoad
{
...
self.scrollView.dragScrollBarDelegate = self;
}
- (void)dragScrollBarWillBeginDragging:(UIScrollView *)scrollView
{
NSLog(@"dragScrollBar began");
}
- (void)dragScrollBarWillEndDragging:(UIScrollView *)scrollView
{
NSLog(@"dragScrollBar ended");
}
YIDragScrollBar
is available under the Beerware license.
If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.