{"id":18408,"date":"2017-07-20T16:03:15","date_gmt":"2017-07-20T20:03:15","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=18408"},"modified":"2017-07-23T16:13:48","modified_gmt":"2017-07-23T20:13:48","slug":"a-favorite-hack","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/07\/20\/a-favorite-hack\/","title":{"rendered":"A Favorite Hack"},"content":{"rendered":"<p><a href=\"https:\/\/david-smith.org\/blog\/2017\/07\/07\/a-favorite-hack\/\">David Smith<\/a>:<\/p>\n<blockquote cite=\"https:\/\/david-smith.org\/blog\/2017\/07\/07\/a-favorite-hack\/\">\n<p>During the introduction of iOS 7 one of the random side effects of the wide reaching changes to the iOS user interface was that app icon badges started to get truncated whenever they got above 4 digits long.<\/p>\n<p>[&#8230;]<\/p>\n<p>So I then set out to alter the numbers that were displayed so that if I thought it would get truncated I would replace the least significant digits with <code>1<\/code>s until it would no longer be truncated.  After a bit of experimentation I found that I needed for a 5 digit number to contain at least <em>two<\/em> <code>1<\/code>s in it in order to be assured that the number wouldn&rsquo;t truncate.  Usually, but not always, the first of these would be the leading digit since getting above 20,000 steps is quite a full day of walking.<\/p>\n<\/blockquote>\n<p>It&rsquo;s not clear to me why he had to remove the badged app icon feature.<\/p>\n<p>Update (2017-07-20): <a href=\"https:\/\/twitter.com\/dkhamsing\/status\/888156134988685312\">Apparently<\/a>, App Review recently changed its mind and asked Smith to remove the feature.<\/p>","protected":false},"excerpt":{"rendered":"<p>David Smith: During the introduction of iOS 7 one of the random side effects of the wide reaching changes to the iOS user interface was that app icon badges started to get truncated whenever they got above 4 digits long. [&#8230;] So I then set out to alter the numbers that were displayed so that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[130,31,1380,469,26,1322,71,385],"class_list":["post-18408","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-rejection","tag-ios","tag-ios-10","tag-ios7","tag-iosapp","tag-pedometer-plus-plus","tag-programming","tag-springboard"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=18408"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18408\/revisions"}],"predecessor-version":[{"id":18429,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18408\/revisions\/18429"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=18408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=18408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=18408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}