Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

Commit

Permalink
Better checking for NSShadow and NSTextAttachment platform support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Bowen committed Oct 23, 2015
1 parent 06f1a0f commit 68cd15a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NSAttributedString+DDHTML/NSAttributedString+DDHTML.m
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ + (NSAttributedString *)attributedStringFromNode:(xmlNodePtr)xmlNode normalFont:

// Shadow Tag
else if (strncmp("shadow", (const char *)xmlNode->name, strlen((const char *)xmlNode->name)) == 0) {
#if !(TARGET_OS_WATCH)
#if __has_include(<UIKit/NSShadow.h>)
NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowOffset = CGSizeMake(0, 0);
shadow.shadowBlurRadius = 2.0;
Expand Down Expand Up @@ -324,7 +324,7 @@ + (NSAttributedString *)attributedStringFromNode:(xmlNodePtr)xmlNode normalFont:

// Images
else if (strncmp("img", (const char *)xmlNode->name, strlen((const char *)xmlNode->name)) == 0) {
#if !(TARGET_OS_WATCH)
#if __has_include(<UIKit/NSTextAttachment.h>)
NSString *src = attributeDictionary[@"src"];
NSString *width = attributeDictionary[@"width"];
NSString *height = attributeDictionary[@"height"];
Expand Down

0 comments on commit 68cd15a

Please sign in to comment.