Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make Hyperion iOS 9 compatible by changing NSAttributedStringKey to NSString. #41

Merged
merged 1 commit into from
Jan 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ @implementation HYPAttributedStringAttributeProvider
{
NSMutableArray<id<HYPInspectorAttribute>> *viewAttributes = [[NSMutableArray alloc] init];

[attributedString enumerateAttributesInRange:NSMakeRange(0, attributedString.length) options:0 usingBlock:^(NSDictionary<NSAttributedStringKey,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {
[attributedString enumerateAttributesInRange:NSMakeRange(0, attributedString.length) options:0 usingBlock:^(NSDictionary<NSString *,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {
HYPAttributedStringInspectorAttribute *attribute = [[HYPAttributedStringInspectorAttribute alloc] initWithAttributedString:[attributedString attributedSubstringFromRange:range] range:range];
[viewAttributes addObject:attribute];
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ -(instancetype)initWithAttributedString:(NSAttributedString *)string
{
self = [[NSBundle bundleForClass:[self class]] loadNibNamed:@"HYPTextPreview" owner:self options:nil].firstObject;

__block NSDictionary<NSAttributedStringKey,id> *attributes;
__block NSDictionary<NSString *,id> *attributes;
__block BOOL viewTooComplicated = false;

NSRange range = NSMakeRange(0, string.length);

[string enumerateAttributesInRange:range options:0 usingBlock:^(NSDictionary<NSAttributedStringKey,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {
[string enumerateAttributesInRange:range options:0 usingBlock:^(NSDictionary<NSString *,id> * _Nonnull attrs, NSRange range, BOOL * _Nonnull stop) {

if (attributes)
{
Expand Down