17 Commits

Author SHA1 Message Date
Ethan Nagel
f497639124 Add support automatically adjusting the content offset to UITableView as well as support for performing endUpdates with no animations. Additionally, there are critical bug fixes for ASDataController (begin/end updates delegates not called in correct order) and ASRangeController (failure to fully refresh internal state when inserts or delete are made.) 2015-07-20 14:05:56 -07:00
Scott Goodson
8fa092fb77 Complete overhaul of ASFlowLayoutController.
Introduced ASIndexPath for efficient handling of index paths in C++ vectors,
while maintaining the readability of ".section" and ".row" instead of
".first" and ".second" inside of complicated business logic.

Confirmed that the working range calls are firing appropriately during
ASTableViewStressTest, including the deallocation of the rich text placeholders
provided by ASTextNode.
2015-07-04 20:22:04 -07:00
Scott Goodson
57465c7fd3 Overhaul ASDataController and extensively test ASTableView.
This diff resolves all known consistency issues with ASTableView and ASCollectionView.
It includes significantly more aggressive thrash-testing in ASTableViewStressTest,
which now passes on a variety of device and simulator configurations.  It also updates
the unit tests run on every commit to ensure any regression is caught quickly.

A few of the salient changes in this diff:
- ASTableView now uses Rene's ASCollectionViewLayoutController, and actually uses a
UICollectionViewFlowLayout without any UICollectionView.  This resolves an issue where
ASFlowLayoutController was generating slightly out-of-bounds indicies when programmatically
scrolling past the end of the table content.  Because the custom implementation is likely
faster, I will revisit this later with profiling and possibly returning to the custom impl.
- There is now a second copy of the _nodes array maintained by ASDataController.  It shares
the same node instances, but this does add some overhead to manipulating the arrays. I've
filed a task to follow up with optimization, as there are several great opportunities to
make it faster.  However, I don't believe the overhead is a significant issue, and it does
guarantee correctness in even the toughest app usage scenarios.
- ASDataController no longer supports calling its delegate /before/ edit operations.  No
other class was relying on this behavior, and it would be unusual for an app developer to
use ASDataController directly.  However, it is possible that someone with a custom view
that integrates with ASDataController and ASRangeController could be affected by this.
- Further cleanup of organization, naming, additional comments, reduced code length
wherever possible.  Overall, significantly more accessible to a new reader.
2015-06-28 18:03:45 -07:00
Rene Cacheaux
0adac6851a Adds abstract ASLayoutController implementation in preparation for custom layout ASLayoutController implementation. 2015-06-21 13:24:24 -05:00
Rene Cacheaux
a7f7620b8c Turns ASScrollDirection into Option set in preparation for supporting 2-axis collection view layouts. Clears test host target warnings. 2015-06-20 18:25:48 -05:00
Ryan Nystrom
599bf42675 Revisions based on feedback 2015-02-26 15:41:32 -08:00
Ryan Nystrom
4fa03a01d1 Functioning Preload range
Refactor how we do ranges so they can be arbitrarily managed. Introduce the concept of a preload range.
2015-02-26 15:41:32 -08:00
Ryan Nystrom
9c877c51af Support for dynamic ranges
This refactors how we do ranges and implements tuning parameters for a "Render" range and a "Preload" range
2015-02-26 15:40:21 -08:00
Ryan Nystrom
43be3294bc Remove "working range" from flow layout
This is a step towards a preloading range. We first want to migrate towards arbitrary ranges instead of being coupled to the notion of a single "working range".
2015-02-26 15:40:21 -08:00
Ryan Nystrom
e6506899cb Code format cleanup 2015-01-29 10:12:12 -08:00
Li Tan
123cab757a Add safety check to avoid crash in ASFlowLayoutController 2015-01-08 11:49:31 -08:00
Li Tan
b9c6f3de03 Fix crash in Flow Controller 2015-01-06 18:04:42 -08:00
Li Tan
e799ed9ea4 fix 2014-12-18 14:00:19 -08:00
Li Tan
3e6436245d fix inserting sections bug 2014-12-18 13:07:43 -08:00
Li Tan
ac86cd9523 Fix crash while deleting multiple sections 2014-12-16 20:04:20 -08:00
Li Tan
62248ee0eb Fix crash in reloadData 2014-12-15 22:36:57 -08:00
Li Tan
f7f5988fcd Support editing in table view and collection view 2014-12-15 13:19:10 -08:00