File tree Expand file tree Collapse file tree 7 files changed +35
-3
lines changed Expand file tree Collapse file tree 7 files changed +35
-3
lines changed Original file line number Diff line number Diff line change
1
+ # 2.4.0
2
+
3
+ - Now you can add the method ` catalogRelatedInfo ` that returns an NSURL to your example, if you wish to link to related information and resources.
4
+ - A performance improvement when fetching all viable classes to build the navigation tree.
5
+
6
+ ## Source changes
7
+
8
+ * [ Add "related info" URLs to examples (#24 )] ( https://github.com/material-foundation/cocoapods-catalog-by-convention/commit/ee57bf7bb544b105c5d91aaa2ef348d0f663a690 ) (Adrian Secord)
9
+ * [[ Runtime] Only select UIViewController subclasses (#22 )] ( https://github.com/material-foundation/cocoapods-catalog-by-convention/commit/ce864aabf505978a3933a93bfcf048f5d41bc071 ) (Robert Moore)
10
+
1
11
# 2.3.1
2
12
3
13
minor bug fix introduced in 2.3.0 that returns wrong boolean values.
Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |s |
2
2
s . name = "CatalogByConvention"
3
- s . version = "2.3.1 "
3
+ s . version = "2.4.0 "
4
4
s . authors = "Google Inc."
5
5
s . summary = "Tools for building a Catalog by Convention."
6
6
s . homepage = "https://github.com/material-foundation/cocoapods-catalog-by-convention"
Original file line number Diff line number Diff line change 1
1
PODS:
2
- - CatalogByConvention (2.2.0 )
2
+ - CatalogByConvention (2.3.1 )
3
3
- CatalogExamples (1.0.0)
4
4
- CatalogUnitTests (1.0.0):
5
5
- Resistor
@@ -22,7 +22,7 @@ EXTERNAL SOURCES:
22
22
:path: components/Resistor
23
23
24
24
SPEC CHECKSUMS:
25
- CatalogByConvention: 5df5831e48b8083b18570dcb804f20fd1c90694f
25
+ CatalogByConvention: 1df2d770271921f668a99245c7c4c129e78941ee
26
26
CatalogExamples: cafe3e4eae3abc948d96beb626657455c1dfb327
27
27
CatalogUnitTests: b7a746f12abb31a905654521ee926ea007ab7275
28
28
Resistor: 36a9ae98666be3b4f34d8133fad442fa87fdbce2
Original file line number Diff line number Diff line change 53
53
/* * Return a description of the example. */
54
54
- (nonnull NSString *)catalogDescription ;
55
55
56
+ /* * Return a link to related information or resources. */
57
+ - (nonnull NSURL *)catalogRelatedInfo ;
58
+
56
59
@end
Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ - (NSString *)exampleDescription {
85
85
return CBCDescriptionFromClass (_exampleClass);
86
86
}
87
87
88
+ - (NSURL *)exampleRelatedInfo {
89
+ NSAssert (_exampleClass != nil , @" This node has no associated example." );
90
+ return CBCRelatedInfoFromClass (_exampleClass);
91
+ }
92
+
88
93
- (BOOL )isPrimaryDemo {
89
94
return CBCCatalogIsPrimaryDemoFromClass (_exampleClass);
90
95
}
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ FOUNDATION_EXTERN UIViewController *CBCViewControllerFromClass(Class aClass);
60
60
/* * Create a description from the provided class. **/
61
61
FOUNDATION_EXTERN NSString *CBCDescriptionFromClass (Class aClass);
62
62
63
+ /* * Create a link to related information from the provided class. **/
64
+ FOUNDATION_EXTERN NSURL *CBCRelatedInfoFromClass (Class aClass);
65
+
63
66
#pragma mark Fix View Debugging
64
67
65
68
/* *
Original file line number Diff line number Diff line change @@ -94,6 +94,9 @@ BOOL CBCCatalogIsDebugLeaf(Class aClass) {
94
94
if (hasIgnoredPrefix) {
95
95
continue ;
96
96
}
97
+ if (![aClass isSubclassOfClass: [UIViewController class ]]) {
98
+ continue ;
99
+ }
97
100
[classes addObject: aClass];
98
101
}
99
102
@@ -135,6 +138,14 @@ BOOL CBCCatalogIsDebugLeaf(Class aClass) {
135
138
return nil ;
136
139
}
137
140
141
+ NSURL *CBCRelatedInfoFromClass (Class aClass) {
142
+ if ([aClass respondsToSelector: @selector (catalogRelatedInfo )]) {
143
+ NSURL *catalogRelatedInfo = [aClass catalogRelatedInfo ];
144
+ return catalogRelatedInfo;
145
+ }
146
+ return nil ;
147
+ }
148
+
138
149
#pragma mark Fix View Debugging
139
150
140
151
void CBCFixViewDebuggingIfNeeded (void ) {
You can’t perform that action at this time.
0 commit comments