timoliver / toscrollbar Goto Github PK
View Code? Open in Web Editor NEWAn interactive scroll bar for traversing comically massive scroll views.
License: MIT License
An interactive scroll bar for traversing comically massive scroll views.
License: MIT License
With handleExclusiveInteractionEnabled = true
, when I grab the scroll bar handle, and drag my finger around quickly (on or away from the handle), it stops recognizing my finger's location, until I slow down a bit, and continue dragging near the handle's x-axis (without ever lifting my finger).
When the flag is set to default false, it appears to behave as expected, but then you just have to drag around much faster to reproduce the above behaviour.
Reproducible on the example project with scrollBar.handleExclusiveInteractionEnabled = YES;
.
Xcode 9.4
iOS 11.2.1 iPhone X
macOS 10.13.5
iOS 11.2 (or possibly earlier) has introduced a regression where tapping down on the track no longer instantly jumps to that section of the scroll view.
Current behavior is that the jump will occur after the user has lifted their finger, or will merely happen on its own after a second if the finger is left down.
This 'delayed' activity seems to imply it's the result of an internal gesture recognizer taking too long to release its control.
Since UIScrollView
uses gesture recognizers internally, I'm GUESSING the best way to fix this is to wrap all of the scroll bar's interactions into a custom recognizer that can then be used to override the scroll view.
I added TOScrollBar
to my UITableView
, but it's not showing. I subclassed a UITableView
in my app and included it in there.
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, self.frame.size.height-144, self.frame.size.width, 40)];
self.items = [@[] mutableCopy];
self.delegate = self;
self.dataSource = self;
self.tableFooterView = footerView;
TOScrollBar *scrollBar = [[TOScrollBar alloc] initWithStyle:TOScrollBarStyleDefault];
[self to_addScrollBar:scrollBar];
self.separatorInset = [scrollBar adjustedTableViewSeparatorInsetForInset:self.separatorInset];
}
return self;
}
Any ideas?
self.myItemsTableView.showsVerticalScrollIndicator = true
scrollBar.trackTintColor = UIColor.black
scrollBar.trackWidth = 3.3
myItemsTableView.to_add(scrollBar)
myItemsTableView.indicatorStyle = UIScrollViewIndicatorStyle.black
myItemsTableView.separatorInset = myItemsTableView.to_scrollBar!.adjustedTableViewSeparatorInset(forInset: myItemsTableView.separatorInset)]
this is how i added the control. If Im missing any code please help to fix the issue.
iOS 11 introduces the concept of 'large titles' in navigation bars as a way of indicating the landing screen in apps. When the scroll content moves, the navigation bar collapses into a normal looking one.
TOScrollBar
originally relied on the assumption that the navigation bar wouldn't change height. As such, it will need to be updated to account for this.
I'm not too sure how I want to go about supporting this yet. Once the user starts manually dragging, the scroll bar can't change its height (That being the case, the section indexes in UITableView
do that right now), so it may be a matter of dynamically adapting the size of the scroll bar to match the size of the navigation bar whenever the user isn't interacting with it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.