123 Commits
Author SHA1 Message Date
Adlai Holler 5e72daa2e3 Pass node along in didEndDisplayingNode method 2016-01-12 15:42:37 -07:00
Scott Goodson d45db5ac32 Disable creation of backing ASTable/CollectionNode for the *View varients (retain cycle). 2016-01-09 20:44:24 -08:00
Scott Goodson 984fe43997 [ASRangeController] Inspect delegate's ASInterfaceState to delay preloading beyond viewport until visible. 2016-01-03 19:14:07 -08:00
Scott Goodson b273f358f5 [ASRangeController] Initial implementation of functional-style, ASInterfaceState-based range controller. 2016-01-01 00:48:44 -08:00
appleguy 50c97b2636 Revert "[ASCellNode] Forward pointInside to node implementation from UITableViewCell." 2015-12-30 23:42:18 -08:00
appleguy cc15d74e67 Merge pull request #1008 from yury/bridge-uitableviewcell-pointinside
[ASCellNode] Forward pointInside to node implementation from UITableViewCell.
2015-12-29 23:25:48 -08:00
Scott Goodson 051f1f6cdd Use _ASDisplayLayer for both ASTableView and ASCollectionView. zeroContentInsets to fix UIKit. 2015-12-29 22:24:44 -08:00
yury 83960065ed Code style fix 2015-12-29 12:10:08 +03:00
yury 382326ea84 Bridge UITableViewCell pointInside to ASNodeCell
Allow ASNodeCell to specify pointInside of UITableViewCell.
This is very usefull, if ASNodeCell is presented as bubble aligned to
left or right (like Messages.app) and we need to be able to select row
only if user taps on bubble.
2015-12-28 16:11:50 +03:00
Scott Goodson 44feece701 Implement node-backing for ASTableView and ASCollectionView, with a strong back-pointer in these cases. 2015-12-26 23:05:34 -08:00
Scott Goodson 4b560a703a PR #1000 on GitHub! Provide a Beta API to enable the new, high efficiency render-ahead mechanism. 2015-12-26 16:34:44 -08:00
Scott Goodson a2cf2a88e6 Overhaul header files / includes to eliminate circular references that Xcode 7 is angry about. 2015-12-25 19:22:00 -08:00
Scott Goodson 7ece41ff64 Delegate definition tweaks for Table and Collection; ensure Table tests run with ARC enabled. 2015-12-24 21:41:12 -08:00
Scott Goodson c1640c7f59 Implement getter methods for new table / collection delegate / dataSource. Make ASTableView node-backed. 2015-12-24 18:02:52 -08:00
Scott Goodson ca57059322 New ASDelegateProxy class to unify logic for Table & Collection forwarding. Fix dealloc-during-animation crash. 2015-12-23 20:01:52 -08:00
Scott Goodson 5745cfd0d8 Enable node detection for tableHeaderView and tableFooterView on ASTableView.
Ensure they behave as managed nodes - which prevents them from clearContents-ing
their subnodes when the table reloads, as they will be onscreen as long as the table is.
2015-12-18 21:58:58 -08:00
Scott Goodson 88b36f58e7 Ensure an empty array is returned if visibleNodes is called before any nodes are complete. 2015-12-06 21:45:46 -08:00
Scott Goodson 840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00
appleguy 3a04cb7cc8 Merge pull request #898 from Adlai-Holler/OptimizeNodeDidRelayout
Reduce Frequency of beginUpdates/endUpdates Due to Node Relayout
2015-12-03 21:02:22 -08:00
Adlai Holler e1d06e70ff Fix constant naming 2015-12-01 12:00:38 -08:00
Adlai Holler ec682db8d7 Fix name 2015-11-30 23:24:57 -08:00
Adlai Holler 1f8df4ffec Use shiny new dequeueReusableCellWithIdentifier:forIndexPath: method in ASTableView 2015-11-30 23:22:53 -08:00
Adlai Holler 0ee1fd82dc Refactor nodeDidRelayoutWithSizeChange: -> nodeDidRelayout:sizeChanged: 2015-11-30 19:29:27 -08:00
Adlai Holler 04d93532bc Only require node sizes once per run loop, and only if a node's size has changed 2015-11-30 17:20:32 -08:00
appleguy bd4b8601ba Merge pull request #837 from levi/levi/cell-selection
Fix selection inconsistency in ASTableView/ASCollectionView cell implementation
2015-11-28 16:56:25 -08:00
appleguy 15f718ddc9 Merge pull request #868 from levi/levi/remove-deprecated
Clean up syntax and organization of ASRangeController
2015-11-23 21:24:58 -08:00
Levi McCallum e05c4b7419 Separate range controller delegate methods into separate data source 2015-11-19 16:01:38 -08:00
Levi McCallum 09a2e086b0 Clean up syntax and method ordering in ASRangeController 2015-11-19 14:03:53 -08:00
Scott Goodson 2a0b9c8e14 Substantially improve behavior of nested Table & Collection Nodes
This ensures memory cleanup happens correctly and introduces a new test project
to support developing new features while stressing tough use cases for correctness.
2015-11-14 15:25:35 -08:00
Levi McCallum 01876ae683 Fix bad rebase 2015-11-11 10:50:20 -08:00
Levi McCallum 2d93192b9f Fix selection behavior of ASTableView cells 2015-11-11 01:06:28 -08:00
appleguy b295eda4b1 Merge pull request #823 from vitalybaev/SocialAppExample
New example app -- a "social" feed similar to Facebook or Twitter
2015-11-08 18:53:22 -08:00
Vitaly Baev b1784bcf9b Fix ASTableViewCell's node selected/highlighted property 2015-11-06 13:46:30 +03:00
Huy Nguyen 12dbfd1992 Only set a default layout delegate to ASCellNode if it is not provided by the async data source 2015-11-04 16:53:36 +02:00
Huy Nguyen 5701cbba40 After relayout of a cell node, table and collection views trigger an empty update transaction, instead of a reload 2015-11-04 16:53:33 +02:00
Scott Goodson e517f88e65 Rename ASCellNode delegate to layoutDelegate to avoid common naming overlap 2015-11-01 12:51:46 -08:00
appleguy 0598935957 Merge pull request #793 from nguyenhuy/ImproveCellNodeRelayout
ASCellNode delegate to automatically resize in table & collection when -setNeedsLayout called.
2015-11-01 11:11:32 -08:00
Huy Nguyen fb18e7635b Notify ASCellNodeDelegate even if a relayout doesn't result in a resize
If the delegate is an ASTableView, relayoutAnimation will still be considered for animation.
2015-10-29 21:27:29 +02:00
Huy Nguyen 00400e166f Introduce ASCellNodeDelegate
- Cell node automatically notifies the delegate after a relayout (via -setNeedsLayout) that results in a new size. Confirming to ASCellNodeDelegate; ASTableView and ASCollectionView reload the calling cell upon notifications. These views automatically set themselves as delegate of every node.
- The result is that ASCellNode subclasses don't need to manually notify the containing view. Thus, `-relayoutItemAtIndexPath` and `-relayoutRowAtIndexPath` are removed.
- Kittens example is updated to reflect the change.
2015-10-29 16:59:46 +02:00
Huy Nguyen cd31f884dd Move ASDisplayNodePerformBlockOnMainThread to ASInternalHelpers 2015-10-29 16:09:36 +02:00
Adlai Holler 50485663b9 Never use setAnimationsEnabled: so we don't risk corrupting enabledness 2015-10-28 16:09:56 -07:00
appleguy 2c8626e1f6 Merge pull request #753 from nguyenhuy/DataControllerSortedTransaction
Sort edit commands during batch updating of table and collection views
2015-10-26 13:40:06 -07:00
Huy Nguyen 6644621c04 Revert "Fix unnecessary relayout if table view width is zero initially"
This reverts commit 7533118945.
2015-10-26 14:28:28 +02:00
Huy Nguyen 72fca5395f Inject an ASDataController class to ASTableView, for testing purposes
- Injection can be done via a new internal initializer. The class will be used by ASTableView to create (and configure) a new data controller.
- ASTableViewTests now injects its own type of ASDataController. This facilitates new ways for testing ASTableView-specific behaviours. The first application is counting the number of times relayoutAllNodes is called on the data controller.
2015-10-26 13:52:49 +02:00
Huy Nguyen 1b500e407f Fix comment in ASTableView 2015-10-26 08:37:17 +02:00
appleguy 7e616756a7 Merge pull request #722 from nguyenhuy/RelayoutCellAPI
Add relayout item/row APIs to ASTableView and ASCollectionView
2015-10-25 21:28:20 -07:00
Huy Nguyen 5ea4b1b92d Implement ASChangeSetDataController. 2015-10-26 06:22:30 +02:00
appleguy 8dddcaa74b Merge pull request #766 from levi/levi/synchronous-reloaddata
Add synchronous reloadData methods to ASTableView and ASCollectionView
2015-10-25 21:05:52 -07:00
Huy Nguyen 7533118945 Fix unnecessary relayout if table view width is zero initially
- During initial configuration of a table view with a zero size, for each cell, there is a mismatch between the widths of its content view and constrained size. However, don't relayout the cell immediately because an initial data loading will be performed shortly afterward.
2015-10-25 18:54:11 +02:00
Huy Nguyen 52a259a487 Better names in ASTableView. 2015-10-25 18:30:51 +02:00