gdavis / gdiindexbar Goto Github PK
View Code? Open in Web Editor NEWA custom index bar component for navigating sections in table views.
License: MIT License
A custom index bar component for navigating sections in table views.
License: MIT License
the regular UITableView supports this feature, I think we should support it as well
Sometimes, when I scroll the table (more than necessary) to see the header, the app stops for 60 seconds, and then after that it crashes giving this message. Probably it is a buffer overflow but I don't know where exactly.
Note that this happens when I scroll the table in a way that the index bar is resized to a very small size, I would say this is related.
I relayout the index bar when scrolling, because I want it below the headerview.
Currently I am using version 0.3.5
A workaround is to limit scrolling, like this:
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
[self.indexView setNeedsLayout];
// to avoid a weird crash
if (scrollView.contentOffset.y < kTableViewScrollLimit) {
scrollView.contentOffset = CGPointMake(0.0f, kTableViewScrollLimit);
}
}
2016-01-29 10:57:08.858 BLABLA[87354:2740121] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM setObject:atIndex:]: index 18446744071562067968 beyond bounds [0 .. 2147483647]'
*** First throw call stack:
(
0 CoreFoundation 0x0000000112edee65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000112957deb objc_exception_throw + 48
2 CoreFoundation 0x0000000112e32454 -[__NSArrayM setObject:atIndex:] + 452
3 GDIIndexBar 0x000000010fbf0338 -[GDIIndexBar updateDisplayedIndexStrings] + 904
4 GDIIndexBar 0x000000010fbf1a69 -[GDIIndexBar drawRect:] + 121
5 UIKit 0x000000011098ff08 -[UIView(CALayerDelegate) drawLayer:inContext:] + 495
6 QuartzCore 0x000000011047b183 -[CALayer drawInContext:] + 257
7 QuartzCore 0x000000011037033d CABackingStoreUpdate_ + 2688
8 QuartzCore 0x000000011047b002 ___ZN2CA5Layer8display_Ev_block_invoke + 59
9 QuartzCore 0x000000011047ae80 _ZN2CA5Layer8display_Ev + 1460
10 QuartzCore 0x000000011046fc69 _ZN2CA5Layer17display_if_neededEPNS_11TransactionE + 293
11 QuartzCore 0x000000011046fcf9 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 35
12 QuartzCore 0x0000000110464475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
13 QuartzCore 0x0000000110491c0a _ZN2CA11Transaction6commitEv + 486
14 QuartzCore 0x00000001104a09f4 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 576
15 CoreFoundation 0x0000000112e3ec84 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
16 CoreFoundation 0x0000000112e3e831 __CFRunLoopDoTimer + 1089
17 CoreFoundation 0x0000000112e00241 __CFRunLoopRun + 1937
18 CoreFoundation 0x0000000112dff828 CFRunLoopRunSpecific + 488
19 GraphicsServices 0x0000000115bcead2 GSEventRunModal + 161
20 UIKit 0x00000001108d9610 UIApplicationMain + 171
21 WorkAngel 0x000000010d5611a3 main + 147
22 libdyld.dylib 0x000000011388e92d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Is there an easy way to expand the indexbar to fill up the vertical space of a view? ( i.e. calculate it's spacing between letters accordingly to the view instead of the developer giving the spacing)
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.