Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid dealloc on background #1394

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
929d118
fix SIMULATE_WEB_RESPONSE not imported #449
wsdwsd0829 Jul 16, 2017
dd24d8f
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Sep 6, 2017
b8eaffa
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Oct 4, 2017
2918ea0
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Oct 11, 2017
9c42266
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Oct 12, 2017
329f35f
Fix to make rangeMode update in right time
wsdwsd0829 Feb 5, 2018
5f8b7ec
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Feb 7, 2018
d87bb11
merge master from upstream
wsdwsd0829 Feb 15, 2018
269c2ab
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Mar 10, 2018
24c1ce8
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Mar 12, 2018
233169e
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Mar 26, 2018
b19f90d
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Mar 28, 2018
b50cec4
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Apr 5, 2018
b75a5f3
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 May 3, 2018
64b46e0
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 May 16, 2018
5fabc1e
remove uncessary assert
wsdwsd0829 May 17, 2018
3d5b84b
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 May 21, 2018
098b978
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Jun 8, 2018
77eefd6
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Jun 13, 2018
0310ed7
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Jul 3, 2018
0b886de
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Jul 25, 2018
a63d438
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Aug 21, 2018
06e18a1
Fix collection cell editing bug for iOS 9 & 10
wsdwsd0829 Aug 22, 2018
918434d
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Aug 31, 2018
41d3680
Revert "Fix collection cell editing bug for iOS 9 & 10"
wsdwsd0829 Sep 10, 2018
34833a3
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Sep 19, 2018
8d82d21
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Sep 25, 2018
f02d47c
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Oct 3, 2018
dfe9123
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Oct 11, 2018
1a6298c
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Oct 23, 2018
8674823
Merge branch 'master' of github.com:TextureGroup/Texture
wsdwsd0829 Nov 30, 2018
54a80cf
Added Bluebird (#1263)
ShihabM Dec 3, 2018
155cce5
Move Bluebird to new row. (#1264)
ay8s Dec 3, 2018
15243ba
Allow setting SDK and platform through environment variables for buil…
wiseoldduck Dec 3, 2018
10d1a6d
Fix isTruncated logic in ASTextNode2 (#1259)
maicki Dec 4, 2018
b1deb9b
Forward hitTest:withEvent and piontInside:withEvent: to node within _…
maicki Dec 6, 2018
337ff50
Escalate directly to yoga root rather than walking up (#1269)
Adlai-Holler Dec 7, 2018
61d6ebf
Disable a11y cache (#1274)
wsdwsd0829 Dec 9, 2018
b8b69c7
Introduce ASCellLayoutMode (#1273)
maicki Dec 10, 2018
de11398
Yoga debug info (#1253)
wsdwsd0829 Dec 10, 2018
fbe6f21
Move assertions so they are valid. (#1261)
wiseoldduck Dec 10, 2018
26326d6
Wrap supplementary node blocks to enable resizing them. (#1265)
wiseoldduck Dec 10, 2018
92504d3
Avoids dealloc on bacground.
wsdwsd0829 Mar 11, 2019
96112ad
Added Bluebird (#1263)
ShihabM Dec 3, 2018
d1ae47a
Move Bluebird to new row. (#1264)
ay8s Dec 3, 2018
e6e59e7
Yoga debug info (#1253)
wsdwsd0829 Dec 10, 2018
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
26 changes: 13 additions & 13 deletions Source/ASCollectionNode+Beta.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,23 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, nonatomic, weak) id<ASBatchFetchingDelegate> batchFetchingDelegate;

/**
* When this mode is enabled, ASCollectionView matches the timing of UICollectionView as closely as possible,
* ensuring that all reload and edit operations are performed on the main thread as blocking calls.
* When this mode is enabled, ASCollectionView matches the timing of UICollectionView as closely as
* possible, ensuring that all reload and edit operations are performed on the main thread as
* blocking calls.
*
* This mode is useful for applications that are debugging issues with their collection view implementation.
* In particular, some applications do not properly conform to the API requirement of UICollectionView, and these
* applications may experience difficulties with ASCollectionView. Providing this mode allows for developers to
* work towards resolving technical debt in their collection view data source, while ramping up asynchronous
* collection layout.
* This mode is useful for applications that are debugging issues with their collection view
* implementation. In particular, some applications do not properly conform to the API requirement
* of UICollectionView, and these applications may experience difficulties with ASCollectionView.
* Providing this mode allows for developers to work towards resolving technical debt in their
* collection view data source, while ramping up asynchronous collection layout.
*
* NOTE: Because this mode results in expensive operations like cell layout being performed on the main thread,
* it should be used as a tool to resolve data source conformance issues with Apple collection view API.
* NOTE: Because this mode results in expensive operations like cell layout being performed on the
* main thread, it should be used as a tool to resolve data source conformance issues with Apple
* collection view API.
*
* @default defaults to NO.
* @default defaults to ASCellLayoutModeNone.
*/
@property (nonatomic) BOOL usesSynchronousDataLoading;
@property (nonatomic) ASCellLayoutMode cellLayoutMode;

/**
* Returns YES if the ASCollectionNode contents are completely synchronized with the underlying collection-view layout.
Expand All @@ -72,8 +74,6 @@ NS_ASSUME_NONNULL_BEGIN

- (void)endUpdatesAnimated:(BOOL)animated completion:(nullable void (^)(BOOL))completion ASDISPLAYNODE_DEPRECATED_MSG("Use -performBatchUpdates:completion: instead.");

- (void)invalidateFlowLayoutDelegateMetrics;

@end

NS_ASSUME_NONNULL_END
16 changes: 8 additions & 8 deletions Source/ASCollectionNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ @interface _ASCollectionPendingState : NSObject {
@property (nonatomic) BOOL allowsSelection; // default is YES
@property (nonatomic) BOOL allowsMultipleSelection; // default is NO
@property (nonatomic) BOOL inverted; //default is NO
@property (nonatomic) BOOL usesSynchronousDataLoading;
@property (nonatomic) ASCellLayoutMode cellLayoutMode;
@property (nonatomic) CGFloat leadingScreensForBatching;
@property (nonatomic, weak) id <ASCollectionViewLayoutInspecting> layoutInspector;
@property (nonatomic) BOOL alwaysBounceVertical;
Expand Down Expand Up @@ -193,7 +193,7 @@ - (void)didLoad
view.inverted = pendingState.inverted;
view.allowsSelection = pendingState.allowsSelection;
view.allowsMultipleSelection = pendingState.allowsMultipleSelection;
view.usesSynchronousDataLoading = pendingState.usesSynchronousDataLoading;
view.cellLayoutMode = pendingState.cellLayoutMode;
view.layoutInspector = pendingState.layoutInspector;
view.showsVerticalScrollIndicator = pendingState.showsVerticalScrollIndicator;
view.showsHorizontalScrollIndicator = pendingState.showsHorizontalScrollIndicator;
Expand Down Expand Up @@ -628,21 +628,21 @@ - (void)setBatchFetchingDelegate:(id<ASBatchFetchingDelegate>)batchFetchingDeleg
return _batchFetchingDelegate;
}

- (BOOL)usesSynchronousDataLoading
- (ASCellLayoutMode)cellLayoutMode
{
if ([self pendingState]) {
return _pendingState.usesSynchronousDataLoading;
return _pendingState.cellLayoutMode;
} else {
return self.view.usesSynchronousDataLoading;
return self.view.cellLayoutMode;
}
}

- (void)setUsesSynchronousDataLoading:(BOOL)usesSynchronousDataLoading
- (void)setCellLayoutMode:(ASCellLayoutMode)cellLayoutMode
{
if ([self pendingState]) {
_pendingState.usesSynchronousDataLoading = usesSynchronousDataLoading;
_pendingState.cellLayoutMode = cellLayoutMode;
} else {
self.view.usesSynchronousDataLoading = usesSynchronousDataLoading;
self.view.cellLayoutMode = cellLayoutMode;
}
}

Expand Down
Loading