<?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; uiactionsheet</title>
	<atom:link href="http://runmad.com/blog/tag/uiactionsheet/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>
]]></content:encoded>
			<wfw:commentRss>http://runmad.com/blog/2010/04/uitabbarcontroller-and-uiactionsheet-65-percent-less-hit-point/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

