{"id":17027,"date":"2017-01-27T14:04:21","date_gmt":"2017-01-27T19:04:21","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=17027"},"modified":"2017-01-27T14:04:21","modified_gmt":"2017-01-27T19:04:21","slug":"interface-builder-view-is-clipping-its-content","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/01\/27\/interface-builder-view-is-clipping-its-content\/","title":{"rendered":"Interface Builder: View Is Clipping Its Content"},"content":{"rendered":"<p><a href=\"http:\/\/indiestack.com\/2017\/01\/interface-builder-view-is-clipping-its-content\/\">Daniel Jalkut<\/a>:<\/p>\n<blockquote cite=\"http:\/\/indiestack.com\/2017\/01\/interface-builder-view-is-clipping-its-content\/\">\n<p>At this point you can usually just &ldquo;size to fit&rdquo; and Interface Builder will use its knowledge of the control&rsquo;s class, and that class&rsquo;s ability to size itself to suit its content. Or, if you&rsquo;re using Auto Layout, it might mean that you need to ask Interface Builder to update the items&rsquo;s frame, allowing Auto Layout to essentially size to fit for you.<\/p>\n<p>In this case however I have a conundrum: both &ldquo;size to fit&rdquo; and AutoLayout insist this is the proper size and placement for the control, yet Interface Builder is still convinced the control will clip its content (the text of the menu item title).<\/p>\n<p>[&#8230;]<\/p>\n<p>I can&rsquo;t win: if I let Auto Layout have it&rsquo;s way, I get an annoying clipping notice. If I let the clipping notice have its way, Auto Layout throws a fit.<\/p>\n<\/blockquote>\n<p>This hasn&rsquo;t worked properly in years. Another reason to go <a href=\"http:\/\/mjtsai.com\/blog\/2016\/10\/18\/working-without-a-nib\/\">nibless<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Daniel Jalkut: At this point you can usually just &ldquo;size to fit&rdquo; and Interface Builder will use its knowledge of the control&rsquo;s class, and that class&rsquo;s ability to size itself to suit its content. Or, if you&rsquo;re using Auto Layout, it might mean that you need to ask Interface Builder to update the items&rsquo;s frame, [&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":[2],"tags":[131,370,30,1381,226],"class_list":["post-17027","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bug","tag-interfacebuilder","tag-mac","tag-macos-10-12","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/17027","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=17027"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/17027\/revisions"}],"predecessor-version":[{"id":17028,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/17027\/revisions\/17028"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=17027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=17027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=17027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}