From 466a90b87dae8b0f169aac7c8a66029dea1ada05 Mon Sep 17 00:00:00 2001 From: Christopher Mays Date: Tue, 16 Jan 2018 19:56:49 -0500 Subject: [PATCH] Make Hyperion iOS 9 compatible by changing NSAttributedStringKey to NSString. --- .../AttributeProviders/HYPAttributedStringAttributeProvider.m | 2 +- .../AttributesViewer/PreviewViews/HYPTextPreview.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AttributesInspector/AttributesViewer/AttributeProviders/HYPAttributedStringAttributeProvider.m b/AttributesInspector/AttributesViewer/AttributeProviders/HYPAttributedStringAttributeProvider.m index 054c886..b7a8a57 100644 --- a/AttributesInspector/AttributesViewer/AttributeProviders/HYPAttributedStringAttributeProvider.m +++ b/AttributesInspector/AttributesViewer/AttributeProviders/HYPAttributedStringAttributeProvider.m @@ -28,7 +28,7 @@ @implementation HYPAttributedStringAttributeProvider { NSMutableArray> *viewAttributes = [[NSMutableArray alloc] init]; - [attributedString enumerateAttributesInRange:NSMakeRange(0, attributedString.length) options:0 usingBlock:^(NSDictionary * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) { + [attributedString enumerateAttributesInRange:NSMakeRange(0, attributedString.length) options:0 usingBlock:^(NSDictionary * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) { HYPAttributedStringInspectorAttribute *attribute = [[HYPAttributedStringInspectorAttribute alloc] initWithAttributedString:[attributedString attributedSubstringFromRange:range] range:range]; [viewAttributes addObject:attribute]; }]; diff --git a/AttributesInspector/AttributesViewer/PreviewViews/HYPTextPreview.m b/AttributesInspector/AttributesViewer/PreviewViews/HYPTextPreview.m index 26d9847..278f95f 100644 --- a/AttributesInspector/AttributesViewer/PreviewViews/HYPTextPreview.m +++ b/AttributesInspector/AttributesViewer/PreviewViews/HYPTextPreview.m @@ -53,12 +53,12 @@ -(instancetype)initWithAttributedString:(NSAttributedString *)string { self = [[NSBundle bundleForClass:[self class]] loadNibNamed:@"HYPTextPreview" owner:self options:nil].firstObject; - __block NSDictionary *attributes; + __block NSDictionary *attributes; __block BOOL viewTooComplicated = false; NSRange range = NSMakeRange(0, string.length); - [string enumerateAttributesInRange:range options:0 usingBlock:^(NSDictionary * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) { + [string enumerateAttributesInRange:range options:0 usingBlock:^(NSDictionary * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) { if (attributes) {