8
8
*
9
9
*/
10
10
11
+ #import < Foundation/Foundation.h>
11
12
#import < ComponentKit/CKDefines.h>
12
-
13
- #if CK_NOT_SWIFT
14
-
15
13
#import < ComponentKit/CKComponent.h>
16
14
17
15
NS_ASSUME_NONNULL_BEGIN
@@ -29,8 +27,17 @@ NS_ASSUME_NONNULL_BEGIN
29
27
30
28
@warning Overriding -layoutThatFits:parentSize: or -computeLayoutThatFits: is **not allowed** for any subclass.
31
29
*/
30
+ NS_SWIFT_NAME (CompositeComponent)
32
31
@interface CKCompositeComponent : CKComponent
33
32
33
+ - (instancetype )init NS_UNAVAILABLE;
34
+ - (instancetype _Nullable)initWithComponent:(NS_RELEASES_ARGUMENT CKComponent *_Nullable)component CK_OBJC_UNAVAILABLE;
35
+
36
+ #if CK_NOT_SWIFT
37
+
38
+ - (instancetype _Nullable)initWithView:(const CKComponentViewConfiguration &)view
39
+ component:(NS_RELEASES_ARGUMENT CKComponent * _Nullable)component CK_SWIFT_DESIGNATED_INITIALIZER;
40
+
34
41
/* * Calls the initializer with {} for view. */
35
42
+ (instancetype _Nullable)newWithComponent:(NS_RELEASES_ARGUMENT CKComponent * _Nullable)component;
36
43
@@ -41,18 +48,20 @@ NS_ASSUME_NONNULL_BEGIN
41
48
*/
42
49
+ (instancetype _Nullable)newWithView:(const CKComponentViewConfiguration &)view component:(NS_RELEASES_ARGUMENT CKComponent * _Nullable)component;
43
50
44
- /* * Access the child component. For intenral use only. */
45
- - (CKComponent * _Nullable)child ;
51
+ CK_COMPONENT_INIT_UNAVAILABLE;
52
+
53
+ #endif
54
+
55
+ /* * Access the child component. For internal use only. */
56
+ @property (nonatomic, strong, readonly, nullable) CKComponent *child;
57
+
46
58
47
59
@end
48
60
49
61
#define CK_COMPOSITE_COMPONENT_INIT_UNAVAILABLE \
50
- CK_COMPONENT_INIT_UNAVAILABLE; \
51
62
+ (instancetype _Nullable)newWithComponent:(NS_RELEASES_ARGUMENT CKComponent * _Nullable)component NS_UNAVAILABLE; \
52
63
+ (instancetype _Nullable)newWithView:(const CKComponentViewConfiguration &)view component:(NS_RELEASES_ARGUMENT CKComponent * _Nullable)component NS_UNAVAILABLE
53
64
54
65
NS_ASSUME_NONNULL_END
55
66
56
67
#import < ComponentKit/CompositeComponentBuilder.h>
57
-
58
- #endif
0 commit comments