Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

[ASDisplayNode] Certain animations cause relayout before layout transitions can complete #1883

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
83d610c
[ASMapNode] Toggle user interaction when liveMap changes (#1753)
george-gw Jun 21, 2016
16ad4c4
Updating diff with latest from master
jellenbogen Jul 11, 2016
b9c9e6b
Update README.md
Jul 11, 2016
bd6e85e
Remove old (original website) files from repository
Jul 11, 2016
cf01017
Update .gitignore
Jul 11, 2016
1d93dbc
Add files via upload
Jul 11, 2016
2317e17
Remove UIKit call from -init!1
Jul 11, 2016
a8f01fb
Merge pull request #1887 from facebook/fixASDKgram
Jul 11, 2016
012c927
[ASLayout] Small optimization to eliminate one method call in an extr…
appleguy Jul 11, 2016
69ca67b
Code cleaning and fixes based on code review.
george-gw Jul 11, 2016
57ece0f
[ASLayoutSpec] Bug where finalLayoutable was not being called for set…
rcancro Jul 11, 2016
0696ea8
fixed trait example
rcancro Jul 11, 2016
f8e294b
fix image paths in example_extra/Multiplex
eJamesLin Jul 11, 2016
488db47
Update GITHUB_RULES.md
Jul 11, 2016
f9629be
[ASMapNode] Defaulting userInteractionEnabled to YES.
george-gw Jul 11, 2016
41e2637
Removed debugging messages from ASMapNode's sample, they are no longe…
george-gw Jul 11, 2016
255e75a
Merge pull request #1893 from eJamesLin/fix_example_Multiplex_image_path
maicki Jul 11, 2016
137c706
Merge pull request #1892 from rcancro/finalLayoutableSetChildren
maicki Jul 11, 2016
93ee42d
Remove assert in visibleStateDidChange: in ASCellNode (#1899)
maicki Jul 12, 2016
7f47372
Change from MutexLocker / MutexUnlocker to lock() and unlock() direct…
maicki Jul 12, 2016
6b44b5a
[ASTableView] Add retainedLayer a la collection view (#1896)
Jul 12, 2016
396583d
[ASMapNode] Protected showAnnotationsOptions with a lock.
george-gw Jul 12, 2016
4b331be
Correctly compare and update title of ASButtonNode
nguyenhuy Jul 12, 2016
dc2255d
Fix setNeedsLayout triggered from subnode will not trigger relayout
maicki Jul 12, 2016
84029d1
Merge pull request #1902 from maicki/MSFixLayoutTriggerFromSubnodeNot…
maicki Jul 12, 2016
2e3da9b
Merge pull request #1903 from nguyenhuy/ASButtonNode_updateTitle
Jul 12, 2016
edb4e45
[ASRangeController] Update synchronously when possible
Adlai-Holler May 3, 2016
5d33ec1
Merge pull request #1619 from Adlai-Holler/RangeControllerSynchronous…
Jul 12, 2016
e40597e
Merge pull request #1792 from george-gw/prMapNode
Jul 12, 2016
2e19d11
Reduce block invocations, other small performance bumps
Jul 12, 2016
6aad142
[ASCollectionDataController] Some optimizations
Jul 12, 2016
9cd606d
Two more small performance wins
Jul 12, 2016
8eb25e7
[ASCollectionDataController] Use block-based enumeration with diction…
Jul 12, 2016
0a9b308
[_ASHierarchyChangeSet] Use std::unordered_map rather than dictionary
Jul 12, 2016
12697f1
AsyncDisplayKitOverview collection nodes size fix
Jul 13, 2016
464fa12
Merge pull request #1910 from feduza/overview-example-fix
Jul 13, 2016
e30c76c
Remove deprecated selected and highlighted methods (#1909)
maicki Jul 13, 2016
3b429f4
Fix building framework in Xcode
maicki Jul 13, 2016
beba131
Merge pull request #1914 from maicki/FixBuildingFrameworkXcode
Jul 13, 2016
793e151
Revert "Fix building framework in Xcode"
maicki Jul 13, 2016
6c82924
Merge pull request #1915 from maicki/RevertFixBuildingFrameworkXcode
maicki Jul 13, 2016
35c860c
Refactor usage of ASCollectionViewLayoutInspecting
maicki Jun 16, 2016
9fb3129
Add default ASCollectionViewLayoutInspecting for custom ASCollectionV…
maicki Jun 17, 2016
30bb2ee
Address comments from @levi
maicki Jun 24, 2016
d82a2e8
Move methods regarding supplementary nodes to optional in ASCollectio…
maicki Jun 27, 2016
8b3ec83
Small name changes
maicki Jul 8, 2016
ce98e56
Use getter of layout inspector to create it lazily and not have to cr…
maicki Jul 11, 2016
3591f7a
[ASViewController] Allow VC to conform to range updating protocol, lo…
Jul 14, 2016
65e194c
[Tests] Add failing tests for weird conformance issue
Jul 14, 2016
bd0254f
[ASRangeControllerUpdateRangeProtocol] BREAKING Remove +setRangeModeF…
Jul 14, 2016
b0a2ba0
[ASTableNode/ASCollectionNode] Make them conform directly to range up…
Jul 14, 2016
787fd8b
[ASViewController] Defer range update conformance check until the act…
Jul 14, 2016
09d1c06
Merge pull request #1755 from maicki/RefactorASCollectionViewLayoutIn…
maicki Jul 14, 2016
6e8772a
Fix sizing of root node in ASViewController for modal presentation an…
maicki Jul 14, 2016
cd46791
Move check for iOS 9 from an early return to an earlier check to prev…
maicki Jul 14, 2016
fd856fc
Merge pull request #1917 from maicki/MSFixLegacySizingASViewController
maicki Jul 14, 2016
92e16fb
Share ASDK's PINRemoteImage cache with default instance of PINRemoteI…
garrettmoon Jul 14, 2016
aaea4a4
Class was in wrong #ifdef, thank you @schneider!
garrettmoon Jul 14, 2016
f95790f
Merge pull request #1923 from garrettmoon/shareMemoryCache
maicki Jul 14, 2016
fe63b7b
Use fast enumeration in a couple places
Jul 14, 2016
bbc957b
Throw away all subcomponents of the text kit renderer if constraints …
maicki Jul 14, 2016
cac0cce
[ASLayoutTransition] Make findNodesInLayoutAtIndexesWithFilteredNodes…
Jul 14, 2016
705cc76
Fix failing ASTextNode tests
maicki Jul 15, 2016
a8c5ac1
[ASDisplayNode] Always layout nodes on a background thread (#1907)
maicki Jul 15, 2016
359785a
[ASDisplayNode] Add automatic measurement before layout (#1725)
maicki Jul 15, 2016
c403175
[ASTextNode] use accessor for `pointSizeScaleFactors`
rcancro Jul 15, 2016
013c163
Merge pull request #1924 from maicki/MSFixASTextNodeTruncationAgain
Jul 15, 2016
e7fc5a9
Merge pull request #1906 from facebook/AHReduceBlockInvocations
Jul 15, 2016
cc8e004
Merge pull request #1921 from facebook/AHRangeModeUpdatingIssues
Jul 15, 2016
729766a
Add convenience functions to create relative sizes with percentage
maicki Jul 15, 2016
eccd704
Merge pull request #1928 from maicki/MSAddRelativeSizePercentage
maicki Jul 15, 2016
4447ae4
Move ASPerformBlockOnBackgroundThread as it already calls the method …
maicki Jul 15, 2016
20a49f0
Comment adjustment for laying out nodes
maicki Jul 15, 2016
fcfce51
Grab propertyLock to get supportsRangeManagedInterfaceState and for a…
maicki Jul 15, 2016
9729b61
Add whitespace
maicki Jul 15, 2016
3237ccc
Merge pull request #1930 from maicki/MSSmallCodeImprovement
maicki Jul 15, 2016
bd907dc
added comment
rcancro Jul 15, 2016
3b09cbb
Merge pull request #1929 from rcancro/textScaleFactors
maicki Jul 15, 2016
dda7acc
[ASCollectionView] When resizing, invalidate after remeasuring all no…
Jul 15, 2016
abf8d5b
[Infer] change atomic properties to nonatomic (#1932)
Jul 16, 2016
bab08c9
Updating diff with latest from master
jellenbogen Jul 11, 2016
897d476
Fixing merge
jellenbogen Jul 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/GITHUB_RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Comment for moving to Ship:

@\<FEATURE_REQUESTOR\> The community is planning an exciting long term road map for the project and getting organized around how to deliver these feature requests.

If you are interested in helping contribute to this component or any other, don’t hesitate to send us an email at AsyncDisplayKit@gmail.com or ping us on ASDK's Slack (#1582). If you would like to contribute for a few weeks, we can also add you to our Ship bug tracker so that you can see what everyone is working on and actively coordinate with us.
If you are interested in helping contribute to this component or any other, don’t hesitate to send us an email at AsyncDisplayKit@gmail.com or ping us on <a href="https://github.com/facebook/AsyncDisplayKit/issues/1582">
ASDK's Slack</a> channel. If you would like to contribute for a few weeks, we can also add you to our Ship bug tracker so that you can see what everyone is working on and actively coordinate with us.

As always, keep filing issues and submitting pull requests here on Github and we will only move things to the new tracker if they require long term coordination.
As always, keep filing issues and submitting pull requests here on Github and we will only move things to the new tracker if they require long term coordination.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ Pods
DerivedData
build

docs/_site
docs/htdocs
docs/.sass-cache

*.swp

*.lock
Expand Down
12 changes: 6 additions & 6 deletions AsyncDisplayKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@
AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; };
AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; };
AC026B701BD57DBF00BBC17E /* _ASHierarchyChangeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; };
AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */; };
AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */; };
AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */; };
AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */; };
AC3C4A521A1139C100143C57 /* ASCollectionView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A501A1139C100143C57 /* ASCollectionView.mm */; };
AC47D9421B3B891B00AAEE9D /* ASCellNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC6456071B0A335000CF11B8 /* ASCellNode.mm */; };
AC47D9461B3BB41900AAEE9D /* ASRelativeSize.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC47D9441B3BB41900AAEE9D /* ASRelativeSize.mm */; };
Expand Down Expand Up @@ -1020,7 +1020,7 @@
AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASChangeSetDataController.h; sourceTree = "<group>"; };
AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASChangeSetDataController.m; sourceTree = "<group>"; };
AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _ASHierarchyChangeSet.h; sourceTree = "<group>"; };
AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _ASHierarchyChangeSet.m; sourceTree = "<group>"; };
AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _ASHierarchyChangeSet.mm; sourceTree = "<group>"; };
AC21EC0F1B3D0BF600C8B19A /* ASStackLayoutDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASStackLayoutDefines.h; path = AsyncDisplayKit/Layout/ASStackLayoutDefines.h; sourceTree = "<group>"; };
AC3C4A4F1A1139C100143C57 /* ASCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ASCollectionView.h; sourceTree = "<group>"; };
AC3C4A501A1139C100143C57 /* ASCollectionView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASCollectionView.mm; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1473,7 +1473,7 @@
058D0A03195D050800B7D73C /* _ASCoreAnimationExtras.h */,
058D0A04195D050800B7D73C /* _ASCoreAnimationExtras.mm */,
AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */,
AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */,
AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */,
058D0A05195D050800B7D73C /* _ASPendingState.h */,
058D0A06195D050800B7D73C /* _ASPendingState.mm */,
058D0A07195D050800B7D73C /* _ASScopeTimer.h */,
Expand Down Expand Up @@ -2054,7 +2054,7 @@
257754B41BEE44CD00737CA5 /* ASTextKitTailTruncater.mm in Sources */,
68B8A4E31CBDB958007E4543 /* ASWeakProxy.m in Sources */,
69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */,
AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */,
AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */,
257754BF1BEE458E00737CA5 /* ASTextKitCoreTextAdditions.m in Sources */,
058D0A18195D050800B7D73C /* _ASDisplayLayer.mm in Sources */,
68355B3C1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m in Sources */,
Expand Down Expand Up @@ -2220,7 +2220,7 @@
9B92C8851BC2EB6E00EE46B2 /* ASCollectionDataController.mm in Sources */,
B350623D1B010EFD0018CF92 /* _ASAsyncTransaction.mm in Sources */,
B35062401B010EFD0018CF92 /* _ASAsyncTransactionContainer.m in Sources */,
AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */,
AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */,
B35062421B010EFD0018CF92 /* _ASAsyncTransactionGroup.m in Sources */,
B350624A1B010EFD0018CF92 /* _ASCoreAnimationExtras.mm in Sources */,
68EE0DC01C1B4ED300BA1B99 /* ASMainSerialQueue.mm in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion AsyncDisplayKit/ASButtonNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ - (void)updateTitle
newTitle = _normalAttributedTitle;
}

if ((_titleNode != nil || newTitle.length > 0) && newTitle != self.titleNode.attributedString) {
if ((_titleNode != nil || newTitle.length > 0) && [self.titleNode.attributedString isEqualToAttributedString:newTitle] == NO) {
_titleNode.attributedString = newTitle;
self.accessibilityLabel = _titleNode.accessibilityLabel;
[self setNeedsLayout];
Expand Down
12 changes: 1 addition & 11 deletions AsyncDisplayKit/ASCellNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {
/*
* ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes.
*/
//@property (atomic, retain) UIColor *backgroundColor;
//@property (nonatomic, retain) UIColor *backgroundColor;
@property (nonatomic) UITableViewCellSelectionStyle selectionStyle;

/**
Expand Down Expand Up @@ -124,16 +124,6 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {

@end

@interface ASCellNode (Deprecated)

/**
* Previous versions of ASDK did not include "is" in the name of the getter for these properties.
* These older accessor methods don't match UIKit naming, and will be removed in a future version.
*/
- (BOOL)selected ASDISPLAYNODE_DEPRECATED;
- (BOOL)highlighted ASDISPLAYNODE_DEPRECATED;

@end

/**
* Simple label-style cell node. Read its source for an example of custom <ASCellNode>s.
Expand Down
17 changes: 6 additions & 11 deletions AsyncDisplayKit/ASCellNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,6 @@ - (void)__setHighlightedFromUIKit:(BOOL)highlighted;
}
}

- (BOOL)selected
{
return self.isSelected;
}

- (BOOL)highlighted
{
return self.isSelected;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls"

Expand Down Expand Up @@ -272,7 +262,12 @@ - (void)visibleStateDidChange:(BOOL)isVisible
{
[super visibleStateDidChange:isVisible];

ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view.");
if (isVisible && self.neverShowPlaceholders) {
[self recursivelyEnsureDisplaySynchronously:YES];
}

// NOTE: This assertion is failing in some apps and will be enabled soon.
// ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view.");
UIView *view = self.view;
CGRect cellFrame = CGRectZero;

Expand Down
6 changes: 1 addition & 5 deletions AsyncDisplayKit/ASCollectionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
* ASCollectionNode is a node based class that wraps an ASCollectionView. It can be used
* as a subnode of another node, and provide room for many (great) features and improvements later on.
*/
@interface ASCollectionNode : ASDisplayNode
@interface ASCollectionNode : ASDisplayNode <ASRangeControllerUpdateRangeProtocol>

- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout;
- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout;
Expand Down Expand Up @@ -111,8 +111,4 @@ NS_ASSUME_NONNULL_BEGIN

@end

@interface ASCollectionNode (ASRangeControllerUpdateRangeProtocol) <ASRangeControllerUpdateRangeProtocol>

@end

NS_ASSUME_NONNULL_END
Loading