2017-04-21 23:34:49 +00:00
|
|
|
/**
|
2018-11-01 17:56:41 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2017-04-21 23:34:49 +00:00
|
|
|
*
|
2018-05-01 21:33:50 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-04-21 23:34:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#import "IGListSectionMap+DebugDescription.h"
|
2017-08-11 16:12:05 +00:00
|
|
|
#import "IGListBindingSectionController.h"
|
2017-04-21 23:34:49 +00:00
|
|
|
|
|
|
|
|
@implementation IGListSectionMap (DebugDescription)
|
|
|
|
|
|
|
|
|
|
- (NSArray<NSString *> *)debugDescriptionLines {
|
|
|
|
|
NSMutableArray *debug = [NSMutableArray new];
|
|
|
|
|
#if IGLK_DEBUG_DESCRIPTION_ENABLED
|
|
|
|
|
[self enumerateUsingBlock:^(id object, IGListSectionController *sectionController, NSInteger section, BOOL *stop) {
|
2017-08-11 16:12:05 +00:00
|
|
|
if ([sectionController isKindOfClass:[IGListBindingSectionController class]]) {
|
|
|
|
|
[debug addObject:[sectionController debugDescription]];
|
|
|
|
|
} else {
|
Minimum fixes for Xcode 9.3 build errors
Summary:
Issue fixed: #1141
This is a set of minimum fixes for Xcode 9.3 rather than #1142. Much smaller diffs 😃
The changes here were done by Xcode's FixIt. See also https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW5.
> Platform Dependencies
>
> OS X uses several data types—NSInteger, NSUInteger,CGFloat, and CFIndex—to provide a consistent means of representing values in 32- and 64-bit environments. In a 32-bit environment, NSInteger and NSUInteger are defined as int and unsigned int, respectively. In 64-bit environments, NSInteger and NSUInteger are defined as long and unsigned long, respectively. To avoid the need to use different printf-style type specifiers depending on the platform, you can use the specifiers shown in Table 3. Note that in some cases you may have to cast the value.
- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1143
Differential Revision: D7551617
Pulled By: rnystrom
fbshipit-source-id: b27ebe2b1a1c93ebfd1218dc38b7621fefee2e6b
2018-04-09 15:06:47 +00:00
|
|
|
[debug addObject:[NSString stringWithFormat:@"Object and section controller at section: %li:", (long)section]];
|
2017-08-11 16:12:05 +00:00
|
|
|
[debug addObject:[NSString stringWithFormat:@" %@", object]];
|
|
|
|
|
[debug addObject:[NSString stringWithFormat:@" %@", sectionController]];
|
|
|
|
|
}
|
2017-04-21 23:34:49 +00:00
|
|
|
}];
|
|
|
|
|
#endif // #if IGLK_DEBUG_DESCRIPTION_ENABLED
|
|
|
|
|
return debug;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|