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

Commit 5fbf396

Browse files
committed
merged upstream
2 parents 6dc15ff + b50d742 commit 5fbf396

120 files changed

Lines changed: 1721 additions & 916 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: objective-c
2+
osx_image: xcode7.2
23
before_install:
34
- brew update
45
- brew reinstall xctool

AsyncDisplayKit-Prefix.gcda

-656 Bytes
Binary file not shown.

AsyncDisplayKit.xcodeproj/project.pbxproj

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
242995D31B29743C00090100 /* ASBasicImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 242995D21B29743C00090100 /* ASBasicImageDownloaderTests.m */; };
129129
251B8EF71BBB3D690087C538 /* ASCollectionDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF21BBB3D690087C538 /* ASCollectionDataController.h */; };
130130
251B8EF81BBB3D690087C538 /* ASCollectionDataController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 251B8EF31BBB3D690087C538 /* ASCollectionDataController.mm */; };
131-
251B8EF91BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF41BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h */; };
131+
251B8EF91BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF41BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h */; settings = {ATTRIBUTES = (Public, ); }; };
132132
251B8EFA1BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 251B8EF51BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m */; };
133133
251B8EFB1BBB3D690087C538 /* ASDataController+Subclasses.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */; };
134134
2538B6F31BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2538B6F21BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.m */; };
@@ -242,7 +242,7 @@
242242
34EFC7771B701D2D00AD841F /* ASStackUnpositionedLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED491B17847A00DA7C62 /* ASStackUnpositionedLayout.h */; };
243243
34EFC7781B701D3100AD841F /* ASStackUnpositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */; };
244244
34EFC7791B701D3600AD841F /* ASLayoutSpecUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */; };
245-
3C9C128519E616EF00E942A0 /* ASTableViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C9C128419E616EF00E942A0 /* ASTableViewTests.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
245+
3C9C128519E616EF00E942A0 /* ASTableViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C9C128419E616EF00E942A0 /* ASTableViewTests.m */; };
246246
430E7C8F1B4C23F100697A4C /* ASIndexPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 430E7C8D1B4C23F100697A4C /* ASIndexPath.h */; settings = {ATTRIBUTES = (Public, ); }; };
247247
430E7C901B4C23F100697A4C /* ASIndexPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 430E7C8D1B4C23F100697A4C /* ASIndexPath.h */; settings = {ATTRIBUTES = (Public, ); }; };
248248
430E7C911B4C23F100697A4C /* ASIndexPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 430E7C8E1B4C23F100697A4C /* ASIndexPath.m */; };
@@ -461,8 +461,13 @@
461461
D785F6621A74327E00291744 /* ASScrollNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D785F6601A74327E00291744 /* ASScrollNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
462462
D785F6631A74327E00291744 /* ASScrollNode.m in Sources */ = {isa = PBXBuildFile; fileRef = D785F6611A74327E00291744 /* ASScrollNode.m */; };
463463
DB7121BCD50849C498C886FB /* libPods-AsyncDisplayKitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EFA731F0396842FF8AB635EE /* libPods-AsyncDisplayKitTests.a */; };
464+
DE040EF91C2B40AC004692FF /* ASCollectionViewFlowLayoutInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF41BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h */; settings = {ATTRIBUTES = (Public, ); }; };
464465
DE6EA3221C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; };
465466
DE6EA3231C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; };
467+
DE8BEAC11C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */; };
468+
DE8BEAC21C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */; };
469+
DE8BEAC31C2DF3FC00D57C12 /* ASDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DE8BEAC01C2DF3FC00D57C12 /* ASDelegateProxy.m */; };
470+
DE8BEAC41C2DF3FC00D57C12 /* ASDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DE8BEAC01C2DF3FC00D57C12 /* ASDelegateProxy.m */; };
466471
DECBD6E71BE56E1900CF4905 /* ASButtonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DECBD6E51BE56E1900CF4905 /* ASButtonNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
467472
DECBD6E81BE56E1900CF4905 /* ASButtonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DECBD6E51BE56E1900CF4905 /* ASButtonNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
468473
DECBD6E91BE56E1900CF4905 /* ASButtonNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = DECBD6E61BE56E1900CF4905 /* ASButtonNode.mm */; };
@@ -759,6 +764,8 @@
759764
D785F6601A74327E00291744 /* ASScrollNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASScrollNode.h; sourceTree = "<group>"; };
760765
D785F6611A74327E00291744 /* ASScrollNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASScrollNode.m; sourceTree = "<group>"; };
761766
DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASDisplayNode+FrameworkPrivate.h"; sourceTree = "<group>"; };
767+
DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDelegateProxy.h; sourceTree = "<group>"; };
768+
DE8BEAC01C2DF3FC00D57C12 /* ASDelegateProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASDelegateProxy.m; sourceTree = "<group>"; };
762769
DECBD6E51BE56E1900CF4905 /* ASButtonNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASButtonNode.h; sourceTree = "<group>"; };
763770
DECBD6E61BE56E1900CF4905 /* ASButtonNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASButtonNode.mm; sourceTree = "<group>"; };
764771
EFA731F0396842FF8AB635EE /* libPods-AsyncDisplayKitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AsyncDisplayKitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1157,6 +1164,8 @@
11571164
25B171EA1C12242700508A7A /* Data Controller */ = {
11581165
isa = PBXGroup;
11591166
children = (
1167+
DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */,
1168+
DE8BEAC01C2DF3FC00D57C12 /* ASDelegateProxy.m */,
11601169
251B8EF21BBB3D690087C538 /* ASCollectionDataController.h */,
11611170
251B8EF31BBB3D690087C538 /* ASCollectionDataController.mm */,
11621171
464052191A3F83C40061C0BA /* ASDataController.h */,
@@ -1273,6 +1282,7 @@
12731282
257754C01BEE458E00737CA5 /* ASTextNodeWordKerner.h in Headers */,
12741283
AC3C4A511A1139C100143C57 /* ASCollectionView.h in Headers */,
12751284
AEEC47E11C20C2DD00EC1693 /* ASVideoNode.h in Headers */,
1285+
DE8BEAC11C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */,
12761286
205F0E1D1B373A2C007741D0 /* ASCollectionViewLayoutController.h in Headers */,
12771287
AC3C4A541A113EEC00143C57 /* ASCollectionViewProtocols.h in Headers */,
12781288
058D0A49195D05CB00B7D73C /* ASControlNode+Subclasses.h in Headers */,
@@ -1441,6 +1451,7 @@
14411451
34EFC7791B701D3600AD841F /* ASLayoutSpecUtilities.h in Headers */,
14421452
B350625C1B010F070018CF92 /* ASLog.h in Headers */,
14431453
0442850E1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h in Headers */,
1454+
DE8BEAC21C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */,
14441455
B35062041B010EFD0018CF92 /* ASMultiplexImageNode.h in Headers */,
14451456
DECBD6E81BE56E1900CF4905 /* ASButtonNode.h in Headers */,
14461457
B35062241B010EFD0018CF92 /* ASMutableAttributedStringBuilder.h in Headers */,
@@ -1461,6 +1472,7 @@
14611472
B35062551B010EFD0018CF92 /* ASSentinel.h in Headers */,
14621473
9C8221961BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */,
14631474
9C49C3701B853961000B0DD5 /* ASStackLayoutable.h in Headers */,
1475+
DE040EF91C2B40AC004692FF /* ASCollectionViewFlowLayoutInspector.h in Headers */,
14641476
34EFC7701B701CFA00AD841F /* ASStackLayoutDefines.h in Headers */,
14651477
254C6B7B1BF94DF4003EC431 /* ASTextKitRenderer+Positioning.h in Headers */,
14661478
CC7FD9E21BB603FF005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */,
@@ -1634,21 +1646,6 @@
16341646
/* End PBXResourcesBuildPhase section */
16351647

16361648
/* Begin PBXShellScriptBuildPhase section */
1637-
1B86F48711505F91D5FEF571 /* Embed Pods Frameworks */ = {
1638-
isa = PBXShellScriptBuildPhase;
1639-
buildActionMask = 2147483647;
1640-
files = (
1641-
);
1642-
inputPaths = (
1643-
);
1644-
name = "Embed Pods Frameworks";
1645-
outputPaths = (
1646-
);
1647-
runOnlyForDeploymentPostprocessing = 0;
1648-
shellPath = /bin/sh;
1649-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests-frameworks.sh\"\n";
1650-
showEnvVarsInLog = 0;
1651-
};
16521649
2E61B6A0DB0F436A9DDBE86F /* Check Pods Manifest.lock */ = {
16531650
isa = PBXShellScriptBuildPhase;
16541651
buildActionMask = 2147483647;
@@ -1727,6 +1724,7 @@
17271724
0549634A1A1EA066000F8E56 /* ASBasicImageDownloader.mm in Sources */,
17281725
299DA1AA1A828D2900162D41 /* ASBatchContext.mm in Sources */,
17291726
AC6456091B0A335000CF11B8 /* ASCellNode.m in Sources */,
1727+
DE8BEAC31C2DF3FC00D57C12 /* ASDelegateProxy.m in Sources */,
17301728
ACF6ED1D1B17843500DA7C62 /* ASCenterLayoutSpec.mm in Sources */,
17311729
18C2ED801B9B7DE800F627B3 /* ASCollectionNode.m in Sources */,
17321730
92DD2FE41BF4B97E0074C9DD /* ASMapNode.mm in Sources */,
@@ -1858,6 +1856,7 @@
18581856
509E68621B3AEDA5009B9150 /* ASAbstractLayoutController.mm in Sources */,
18591857
254C6B861BF94F8A003EC431 /* ASTextKitContext.mm in Sources */,
18601858
34EFC7621B701CA400AD841F /* ASBackgroundLayoutSpec.mm in Sources */,
1859+
DE8BEAC41C2DF3FC00D57C12 /* ASDelegateProxy.m in Sources */,
18611860
B35062141B010EFD0018CF92 /* ASBasicImageDownloader.mm in Sources */,
18621861
B35062161B010EFD0018CF92 /* ASBatchContext.mm in Sources */,
18631862
AC47D9421B3B891B00AAEE9D /* ASCellNode.m in Sources */,
@@ -1964,6 +1963,7 @@
19641963
CLANG_WARN_UNREACHABLE_CODE = YES;
19651964
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
19661965
ENABLE_STRICT_OBJC_MSGSEND = YES;
1966+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
19671967
GCC_PREPROCESSOR_DEFINITIONS = (
19681968
"DEBUG=1",
19691969
"$(inherited)",
@@ -1984,6 +1984,7 @@
19841984
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
19851985
COPY_PHASE_STRIP = NO;
19861986
ENABLE_STRICT_OBJC_MSGSEND = YES;
1987+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
19871988
INFOPLIST_FILE = AsyncDisplayKitTestHost/Info.plist;
19881989
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
19891990
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -2071,6 +2072,7 @@
20712072
APPLICATION_EXTENSION_API_ONLY = YES;
20722073
DSTROOT = /tmp/AsyncDisplayKit.dst;
20732074
GCC_INPUT_FILETYPE = automatic;
2075+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
20742076
GCC_PRECOMPILE_PREFIX_HEADER = YES;
20752077
GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch";
20762078
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@@ -2089,6 +2091,7 @@
20892091
APPLICATION_EXTENSION_API_ONLY = YES;
20902092
DSTROOT = /tmp/AsyncDisplayKit.dst;
20912093
GCC_INPUT_FILETYPE = automatic;
2094+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
20922095
GCC_PRECOMPILE_PREFIX_HEADER = YES;
20932096
GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch";
20942097
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@@ -2111,6 +2114,7 @@
21112114
"$(inherited)",
21122115
"$(DEVELOPER_FRAMEWORKS_DIR)",
21132116
);
2117+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
21142118
GCC_PRECOMPILE_PREFIX_HEADER = YES;
21152119
GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch";
21162120
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -2138,6 +2142,7 @@
21382142
"$(inherited)",
21392143
"$(DEVELOPER_FRAMEWORKS_DIR)",
21402144
);
2145+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
21412146
GCC_PRECOMPILE_PREFIX_HEADER = YES;
21422147
GCC_PREFIX_HEADER = "AsyncDisplayKit/AsyncDisplayKit-Prefix.pch";
21432148
GCC_PREPROCESSOR_DEFINITIONS = (
@@ -2166,6 +2171,7 @@
21662171
DYLIB_CURRENT_VERSION = 1;
21672172
DYLIB_INSTALL_NAME_BASE = "@rpath";
21682173
ENABLE_STRICT_OBJC_MSGSEND = YES;
2174+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
21692175
GCC_NO_COMMON_BLOCKS = YES;
21702176
GCC_PREPROCESSOR_DEFINITIONS = (
21712177
"DEBUG=1",
@@ -2198,6 +2204,7 @@
21982204
DYLIB_CURRENT_VERSION = 1;
21992205
DYLIB_INSTALL_NAME_BASE = "@rpath";
22002206
ENABLE_STRICT_OBJC_MSGSEND = YES;
2207+
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
22012208
GCC_NO_COMMON_BLOCKS = YES;
22022209
INFOPLIST_FILE = "$(SRCROOT)/AsyncDisplayKit-iOS/Info.plist";
22032210
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

AsyncDisplayKit/ASButtonNode.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* of patent rights can be found in the PATENTS file in the same directory.
77
*/
88

9-
#import <AsyncDisplayKit/AsyncDisplayKit.h>
9+
#import <AsyncDisplayKit/ASTextNode.h>
10+
#import <AsyncDisplayKit/ASImageNode.h>
1011

1112
typedef enum : NSUInteger {
1213
ASButtonStateNormal,
@@ -31,6 +32,17 @@ typedef enum : NSUInteger {
3132
*/
3233
@property (nonatomic, assign) BOOL laysOutHorizontally;
3334

35+
/** Horizontally align content (text or image).
36+
Defaults to ASAlignmentMiddle.
37+
*/
38+
@property (nonatomic, assign) ASHorizontalAlignment contentHorizontalAlignment;
39+
40+
/** Vertically align content (text or image).
41+
Defaults to ASAlignmentCenter.
42+
*/
43+
@property (nonatomic, assign) ASVerticalAlignment contentVerticalAlignment;
44+
45+
3446
- (NSAttributedString *)attributedTitleForState:(ASButtonState)state;
3547
- (void)setAttributedTitle:(NSAttributedString *)title forState:(ASButtonState)state;
3648

AsyncDisplayKit/ASButtonNode.mm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
*/
88

99
#import "ASButtonNode.h"
10-
11-
#import <AsyncDisplayKit/ASThread.h>
10+
#import "ASStackLayoutSpec.h"
11+
#import "ASThread.h"
12+
#import "ASDisplayNode+Subclasses.h"
1213

1314
@interface ASButtonNode ()
1415
{
@@ -39,6 +40,9 @@ - (instancetype)init
3940
_titleNode = [[ASTextNode alloc] init];
4041
_imageNode = [[ASImageNode alloc] init];
4142

43+
_contentHorizontalAlignment = ASAlignmentMiddle;
44+
_contentVerticalAlignment = ASAlignmentCenter;
45+
4246
[self addSubnode:_titleNode];
4347
[self addSubnode:_imageNode];
4448

@@ -195,8 +199,8 @@ - (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
195199
ASStackLayoutSpec *stack = [[ASStackLayoutSpec alloc] init];
196200
stack.direction = self.laysOutHorizontally ? ASStackLayoutDirectionHorizontal : ASStackLayoutDirectionVertical;
197201
stack.spacing = self.contentSpacing;
198-
stack.justifyContent = ASStackLayoutJustifyContentCenter;
199-
stack.alignItems = ASStackLayoutAlignItemsCenter;
202+
stack.horizontalAlignment = _contentHorizontalAlignment;
203+
stack.verticalAlignment = _contentVerticalAlignment;
200204

201205
NSMutableArray *children = [[NSMutableArray alloc] initWithCapacity:2];
202206
if (self.imageNode.image) {

AsyncDisplayKit/ASCellNode.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#import <AsyncDisplayKit/ASDisplayNode.h>
1010

11+
NS_ASSUME_NONNULL_BEGIN
12+
1113
@class ASCellNode;
1214

1315
typedef NSUInteger ASCellNodeAnimation;
@@ -77,10 +79,10 @@ typedef NSUInteger ASCellNodeAnimation;
7779
* ASCellNode must forward touch events in order for UITableView and UICollectionView tap handling to work. Overriding
7880
* these methods (e.g. for highlighting) requires the super method be called.
7981
*/
80-
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
81-
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
82-
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
83-
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
82+
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
83+
- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
84+
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
85+
- (void)touchesCancelled:(nullable NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event ASDISPLAYNODE_REQUIRES_SUPER;
8486

8587
/**
8688
* Marks the node as needing layout. Convenience for use whether the view / layer is loaded or not.
@@ -119,3 +121,5 @@ typedef NSUInteger ASCellNodeAnimation;
119121
@property (nonatomic, copy) NSString *text;
120122

121123
@end
124+
125+
NS_ASSUME_NONNULL_END

AsyncDisplayKit/ASCellNode.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ - (instancetype)init
167167
{
168168
if (!(self = [super init]))
169169
return nil;
170-
170+
171+
_text = @"";
171172
_textNode = [[ASTextNode alloc] init];
172173
[self addSubnode:_textNode];
173174

AsyncDisplayKit/ASCollectionNode.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@
88

99
#import <AsyncDisplayKit/ASCollectionView.h>
1010

11+
NS_ASSUME_NONNULL_BEGIN
12+
1113
/**
1214
* ASCollectionNode is a node based class that wraps an ASCollectionView. It can be used
1315
* as a subnode of another node, and provide room for many (great) features and improvements later on.
1416
*/
1517
@interface ASCollectionNode : ASDisplayNode
1618

17-
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout NS_DESIGNATED_INITIALIZER;
19+
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout;
20+
- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout;
21+
22+
@property (weak, nonatomic) id <ASCollectionDelegate> delegate;
23+
@property (weak, nonatomic) id <ASCollectionDataSource> dataSource;
1824

1925
@property (nonatomic, readonly) ASCollectionView *view;
2026

@@ -63,3 +69,5 @@
6369
- (void)reloadDataImmediately;
6470

6571
@end
72+
73+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)