{"id":4636,"date":"2014-03-30T14:14:02","date_gmt":"2014-03-30T14:14:02","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/iphone-uilabel-text-soft-shadow-collection-of-common-programming-errors\/"},"modified":"2014-03-30T14:14:02","modified_gmt":"2014-03-30T14:14:02","slug":"iphone-uilabel-text-soft-shadow-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/iphone-uilabel-text-soft-shadow-collection-of-common-programming-errors\/","title":{"rendered":"iPhone UILabel text soft shadow-Collection of common programming errors"},"content":{"rendered":"<p>I know soft shadows are not supported by the UILabel out of the box, on the iPhone. So what would be the best way to implement my own one?<\/p>\n<p>EDIT:<\/p>\n<p>Obviously I will subclass the UILabel and draw in the -drawRect: My question is, how do I get the contents of the label as graphics and draw around them, blur them etc&#8230;<\/p>\n<p>EDIT 2:<\/p>\n<p>I returned to this question about a year later. In the meantime I&#8217;ve built a class that allows you to easily add soft shadow to a label and tweak it&#8217;s radius etc and also to draw gradients on the text itself. You can find it on GitHub: https:\/\/github.com\/doukasd\/iOS-Components\/tree\/master\/Views<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I know soft shadows are not supported by the UILabel out of the box, on the iPhone. So what would be the best way to implement my own one? EDIT: Obviously I will subclass the UILabel and draw in the -drawRect: My question is, how do I get the contents of the label as graphics [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4636","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4636"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4636\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}