<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rune&#039;s Blog &#187; uiapplication</title>
	<atom:link href="http://runmad.com/blog/tag/uiapplication/feed/" rel="self" type="application/rss+xml" />
	<link>http://runmad.com/blog</link>
	<description>A blog about code, graphics, UI, marketing and whatever else interests me. Follow me on Twitter: @runmad</description>
	<lastBuildDate>Sat, 28 Jan 2012 14:08:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>UITabBarController and UIActionSheet &#8211; 65% less hit point!</title>
		<link>http://runmad.com/blog/2010/04/uitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point/</link>
		<comments>http://runmad.com/blog/2010/04/uitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 16:05:33 +0000</pubDate>
		<dc:creator>Rune Madsen</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[uiactionsheet]]></category>
		<category><![CDATA[uiapplication]]></category>
		<category><![CDATA[uitabbarcontroller]]></category>

		<guid isPermaLink="false">http://runmad.com/blog/?p=111</guid>
		<description><![CDATA[Ever noticed an app where the UIActionSheet&#8217;s bottom button doesn&#8217;t want to respond to your taps, unless you hit exactly in the top of the button? If you have a UITabBarController and want to display a UIActionSheet, you have to be careful with what view you show the UIActionSheet in. If a UIActionSheet is shown [...]]]></description>
			<content:encoded><![CDATA[<p>Ever noticed an app where the UIActionSheet&#8217;s bottom button doesn&#8217;t want to respond to your taps, unless you hit exactly in the top of the button? If you have a UITabBarController and want to display a UIActionSheet, you have to be careful with what view you show the UIActionSheet in.</p>
<p>If a UIActionSheet is shown in &#8220;self&#8221; or &#8220;self.view&#8221; and you got a UITabBarController behind it less than half of the last button will respond to taps:</p>
<div style="margin:0px 0px 20px;text-align:left;color:#000000; background-color:#F1EFE6; border: 1px solid rgb(211, 209, 199); padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:small; font-family:monospace; "><span style="color:#400080;">UIActionSheet</span> *actionSheet = [[<span style="color:#400080;">UIActionSheet</span> <span style="color:#ff0000;">alloc</span>] <span style="color:#6c0540;">initWithTitle:</span><span style="color:#760f15;">@&quot;UIActionSheet Title&quot;</span> <span style="color:#6c0540;">delegate:</span><span style="color:#881350;">nil</span> <span style="color:#6c0540;">cancelButtonTitle:</span><span style="color:#760f15;">@&quot;Cancel&quot;</span> <span style="color:#6c0540;">destructiveButtonTitle:</span><span style="color:#881350;">nil</span> <span style="color:#6c0540;">otherButtonTitles:</span><span style="color:#760f15;">@&quot;Option 1&quot;</span>, <span style="color:#760f15;">@&quot;Option 2&quot;</span>, <span style="color:#881350;">nil</span>];<br />
actionSheet.actionSheetStyle = <span style="color:#400080;">UIActionSheetStyleBlackTranslucent</span>;<br />
[actionSheet <span style="color:#6c0540;">showInView:</span><span style="color:#881350;">self</span>];<br />
[actionSheet <span style="color:#ff0000;">release</span>];</div>
<p>Here&#8217;s how much of the button will actually respond to taps:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-112" title="cannothituiactionsheet" src="http://runmad.com/blog/wp-content/uploads/2010/04/cannothituiactionsheet.png" alt="" width="414" height="251" /></p>
<p>Here&#8217;s what you need to do to fix it:</p>
<div style="margin:0px 0px 20px;text-align:left;color:#000000; background-color:#F1EFE6; border: 1px solid rgb(211, 209, 199); padding:0.5em 1em 0.5em 1em; overflow:auto;font-size:small; font-family:monospace; ">[actionSheet <span style="color:#6c0540;">showInView:</span>[[[<span style="color:#400080;">UIApplication</span> <span style="color:#6c0540;">sharedApplication</span>] <span style="color:#6c0540;">windows</span>] <span style="color:#6c0540;">objectAtIndex:</span><span style="color:#0000ff;">0</span>]];</div>
<p>And what it does:</p>
<p><img class="aligncenter size-full wp-image-115" title="canhituiactionsheet" src="http://runmad.com/blog/wp-content/uploads/2010/04/canhituiactionsheet.png" alt="" width="414" height="251" /></p>
<p><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;counturl=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;count=none&amp;text=UITabBarController%20and%20UIActionSheet%20%E2%80%93%2065%25%20less%20hit%20point%21" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service twitter_tweet" src="http://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;counturl=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;count=none&amp;text=UITabBarController%20and%20UIActionSheet%20%E2%80%93%2065%25%20less%20hit%20point%21" scrolling="no" style="border:none;overflow:hidden;width:55px;height:20px"></iframe><!--<![endif]--><!--[if IE]><iframe frameborder="0" allowTransparency="true" class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><![endif]--><!--[if !IE]><!--><iframe class="addtoany_special_service facebook_like" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;layout=button_count&amp;show_faces=false&amp;width=75&amp;action=like&amp;colorscheme=light&amp;height=20&amp;ref=addtoany" scrolling="no" style="border:none;overflow:hidden;width:90px;height:21px"></iframe><!--<![endif]--><a class="a2a_button_instapaper" href="http://www.addtoany.com/add_to/instapaper?linkurl=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;linkname=UITabBarController%20and%20UIActionSheet%20%E2%80%93%2065%25%20less%20hit%20point%21" title="Instapaper" rel="nofollow" target="_blank"><img src="http://runmad.com/blog/wp-content/plugins/add-to-any/icons/instapaper.png" width="16" height="16" alt="Instapaper"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;linkname=UITabBarController%20and%20UIActionSheet%20%E2%80%93%2065%25%20less%20hit%20point%21" title="Email" rel="nofollow" target="_blank"><img src="http://runmad.com/blog/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Frunmad.com%2Fblog%2F2010%2F04%2Fuitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point%2F&amp;title=UITabBarController%20and%20UIActionSheet%20%E2%80%93%2065%25%20less%20hit%20point%21" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://runmad.com/blog/2010/04/uitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

