{"id":133,"date":"2017-04-04T23:34:44","date_gmt":"2017-04-04T23:34:44","guid":{"rendered":"http:\/\/redquark.com\/wp\/?p=133"},"modified":"2017-04-09T00:04:07","modified_gmt":"2017-04-09T00:04:07","slug":"uikit-fundamentals-build-v1-0-of-the-mememe-app-nsattributedstrings","status":"publish","type":"post","link":"https:\/\/redquark.com\/wp\/?p=133","title":{"rendered":"UIKit Fundamentals: Build v1.0 of the MemeMe App \/ NSAttributedStrings"},"content":{"rendered":"<p>This rant is not about the UIKit Fundamentals course <em>per se<\/em>, but rather the difficulty of finding decent documentation on the <strong>NSAttributedString<\/strong> class. If you are looking for it, here it is: <a href=\"https:\/\/www.invasivecode.com\/weblog\/attributed-text-swift\/\">NSAttributedString iOS Swift<\/a>. You will note that link does <em>not<\/em>\u00a0go to developer.apple.com. The information needed for the v1.0 build of the MemeMe app may be on Apple&#8217;s website, but I spent a great deal of time not finding it.<\/p>\n<p>The particular bit of needed information I was looking for is not easily guessed either, as it is both complicated and non-intuitive:<\/p>\n<ul>\n<li><strong>NSStrokeWidthAttributeName<\/strong> will override\u00a0<strong>NSForegroundColorAttributeName<\/strong>, such that the foreground color is clear, if the specified stroke width is positive.<\/li>\n<li><strong>NSStrokeWidthAttributeName<\/strong> with a <em>negative<\/em> stroke width on the other hand will use the <strong>NSForegroundColorAttributeName<\/strong> as the fill color.<\/li>\n<\/ul>\n<p>Kudos to\u00a0<strong>Eva Diaz-Santana<\/strong> (<a href=\"http:\/\/twitter.com\/evdiasan\" target=\"_blank\">@evdiasan<\/a>) for providing that information on a web page that is everything Apple should have provided easy reference to from the <strong>NSAttributedString<\/strong> class documentation: a clear, visual representation of just what all of those attributes mean and how to use them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This rant is not about the UIKit Fundamentals course per se, but rather the difficulty of finding decent documentation on the NSAttributedString class. If you are looking for it, here it is: NSAttributedString iOS Swift. You will note that link does not\u00a0go to developer.apple.com. The information needed for the v1.0 build of the MemeMe app [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-ios-developer-nanodegree"],"_links":{"self":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133"}],"version-history":[{"count":1,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":134,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions\/134"}],"wp:attachment":[{"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redquark.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}