Skip to content

Instantly share code, notes, and snippets.

View mjarvis's full-sized avatar

Malcolm Jarvis mjarvis

  • British Columbia
View GitHub Profile
@mjarvis
mjarvis / NSHTMLTextDocumentType
Last active October 16, 2017 22:05
This GIST is to help explain the behaviour of NSAttributedString's "initWithData:options:documentAttributes:error:" when used with NSHTMLDocumentType.At first glance, one would expect the output here to be "1, 2, 3", But after some careful reading of the documentation, and if you run the code here, we find that not to be true.
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"3");
});
NSLog(@"1");
[[NSAttributedString alloc] initWithData:[@"<span>html!</span>" dataUsingEncoding:NSUTF8StringEncoding]
options:@{
@adamgit
adamgit / .gitignore
Last active March 20, 2025 10:01
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#