Commit Graph

13022 Commits

Author SHA1 Message Date
appleguy
40f138db27 Merge pull request #799 from facebook/RangeCleanup
Fix retain cycle for basic ASNetworkImageNodes (allocated without a cache)
2015-10-31 00:06:07 -07:00
Scott Goodson
3175ce2fe7 Fix retain cycle in basic, cache-less ASNetworkImageNodes
This should not directly affect more complex apps that don't use the ASBasicImageDownloader.

Also disables the default-on text placeholders, as they churn memory during the measurement pass.
These were intended to be written with pure layers (without using backing stores), so I don't
think it is a reasonable default-on behavior until that is fixed.
2015-10-30 22:42:05 -07:00
Lukas Spieß
882b7d8179 Update build number 2015-10-30 12:49:45 +01:00
Samuel Hsiung
29a12834b0 adds convenience methods to return a vertical and horizontal stack spec 2015-10-29 20:06:46 -07:00
appleguy
ed63577370 Merge pull request #789 from Adlai-Holler/FixAnimationEnabledness
Avoid overwriting areAnimationsEnabled if app changes it again during animation
2015-10-29 18:45:37 -07: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
Adlai Holler
cf8946cf97 Use fast enumeration when performing collection view update blocks 2015-10-29 10:30:12 -07:00
Lukas Spieß
e3e40a34b4 Small improvement for docs reference 2015-10-29 18:04:04 +01:00
Adlai Holler
82c1549d8f Fix nullability of ASDisplayNode.name 2015-10-29 09:57:27 -07:00
Huy Nguyen
5b8f7e978d Improve documentation of ASCellNode setNeedsLayout 2015-10-29 16:59:50 +02:00
Huy Nguyen
c7d18a4f1b ASTextCellNode triggers a relayout after a text change 2015-10-29 16:59:50 +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
Lukas Spieß
314272af9f Merge branch 'develop' into feature/telemetry
# Conflicts:
#	Classes/BITImageAnnotationViewController.m
#	HockeySDK-Source.podspec
#	README.md
#	Support/buildnumber.xcconfig
#	docs/Changelog-template.md
#	docs/Guide-Installation-Setup-template.md
2015-10-29 12:47:48 +01:00
Adlai Holler
f2a095a459 Fix test build by casting test image identifiers 2015-10-28 21:18:13 -07:00
Adlai Holler
0e90d0556f Fix UIView+ASConvenience.h merge 2015-10-28 21:15:14 -07:00
Adlai Holler
8e104f4887 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASCollectionView.h
	AsyncDisplayKit/ASDisplayNode.h
	AsyncDisplayKit/Details/ASDataController.h
	AsyncDisplayKit/Details/UIView+ASConvenience.h
	AsyncDisplayKit/Layout/ASLayoutSpec.h
2015-10-28 21:10:27 -07:00
Adlai Holler
50485663b9 Never use setAnimationsEnabled: so we don't risk corrupting enabledness 2015-10-28 16:09:56 -07:00
appleguy
f11b6ac914 Merge pull request #783 from vitalybaev/NSSpainTalkLink
Link to NSSpain talk
2015-10-28 12:38:31 -07:00
appleguy
e46fc8ec53 Merge pull request #786 from eanagel/fix-cgcolor-leak
release any CGColor's set while the node is in a pending state
2015-10-28 12:37:54 -07:00
Ethan Nagel
a2bc2074cc release any CGColor's set while the node is in a pending state 2015-10-28 11:01:01 -07:00
Vitaly Baev
681f20939c Fix link to NSSpain talk 2015-10-28 13:39:25 +03:00
Vitaly Baev
88b74a4a00 Link to NSSpain talk 2015-10-28 11:11:36 +03:00
Levi McCallum
03bd1f4358 Expose ASViewController's constrained size for subclass customization 2015-10-27 11:40:43 -07:00
Lukas Spieß
6fa8145081 Add appledoc 2.2.1 (1334) build to repository
Commit: 082750ea27
2015-10-27 15:24:30 +01: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
048566aed5 Fix unstable tests related to relayoutAllNodes in ASTableViewTests
- After node constrained sizes were changed (because the table view width was changed, for example) and before relayoutAllNodes is executed (on main), if there is any layout tasks being executed on background, the new sizes will be used immediately. Therefore, by the time relayoutAllNodes is performed, some nodes already have an up-to-date layout and don't need to remeasure.
- As a result, after relayoutAllNodes is completed, the number of layout passes performed on main thread for each node increased between 0 and 1 (i.e some nodes were remeasured, others weren't). ASTableViewTests is updated to assert this behaviour.
2015-10-26 13:47:08 +02:00
Lukas Spieß
61c767c56a Small fix for documentation of deprecated property 2015-10-26 11:55:56 +01:00
Huy Nguyen
1b500e407f Fix comment in ASTableView 2015-10-26 08:37:17 +02:00
appleguy
6c0818790c Merge pull request #774 from nguyenhuy/FixFailingTestsRelatedToDisplayNodeName
Fix failing tests related to ASDisplayNode name
2015-10-25 23:26:53 -07:00
Huy Nguyen
b77522bf4f Remove debugging names of ASDisplayNode and _ASDisplayLayer
- They are neither considered internally nor in tests. And when they are accidently considered, they cause tests to fail.
- Developers can easily set debugging names themselves whenever needed.
2015-10-26 07:44:59 +02:00
Huy Nguyen
53a3b76d6d Add read-only names to UIView and CALayer
- Backed by name of the underlying ASDisplayNode.
- Remove goofy usages of `setValue:forKey:` in ASDisplayNodeTests and ASDisplayNodeAppearanceTests.
2015-10-26 07:44:05 +02:00
Huy Nguyen
fd0b3aaf52 Revert "Revert "Make ASDisplayNode.name Thread Safe""
This reverts commit 906d7c759b.
2015-10-26 06:29:01 +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
ecc5e1ac83 Remove duplicate steps while coalescing changes in _ASHierarchyChangeSet 2015-10-26 06:22:30 +02:00
Huy Nguyen
8745a478ec Add documentation to ASChangeSetDataController. 2015-10-26 06:22:30 +02:00
Huy Nguyen
0315d628c5 Rename as_inverseCompare to asdk_inverseCompare for prefix consistency 2015-10-26 06:22:30 +02:00
Huy Nguyen
5ea4b1b92d Implement ASChangeSetDataController. 2015-10-26 06:22:30 +02:00
appleguy
7a97c5ca00 Merge pull request #751 from rcancro/debugBox
Ascii art visual debugging for ASLayoutSpecs
2015-10-25 21:19:09 -07: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
appleguy
7d013a70ac Merge pull request #762 from levi/supplementary-views
Respond to supplementary node feedback
2015-10-25 19:45:00 -07:00
appleguy
082683e6bd Merge pull request #773 from facebook/revert-768-ThreadSafeName
Revert "Make ASDisplayNode.name Thread Safe" - resolve test breakage
2015-10-25 19:41:45 -07:00
appleguy
906d7c759b Revert "Make ASDisplayNode.name Thread Safe" 2015-10-25 19:40:47 -07:00
appleguy
61429357af Merge pull request #768 from Adlai-Holler/ThreadSafeName
Make ASDisplayNode.name Thread Safe
2015-10-25 12:47:07 -07:00
appleguy
ac0caf3d49 Merge pull request #770 from nguyenhuy/FixTableViewTests
Fix table view tests
2015-10-25 11:50:25 -07:00
Huy Nguyen
7b71462763 Refactor ASTableViewTests
- Add -triggerFirstLayoutMeasurementForTableView:
- Move -triggerSizeChangeAndAssertRelayoutAllRowsForTableView:newSize to the end of the file.
2015-10-25 18:54:39 +02: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