<?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>richard hyland</title>
	<atom:link href="http://www.richardhyland.com/diary/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardhyland.com/diary</link>
	<description>random ramblings of a web, windows and iphone developer, oh and amateur photographer</description>
	<lastBuildDate>Fri, 16 Jul 2010 13:32:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='www.richardhyland.com' port='80' path='/diary/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>How to harness the Retina Display in your app</title>
		<link>http://www.richardhyland.com/diary/2010/07/15/how-to-harness-the-retina-display-in-your-app/</link>
		<comments>http://www.richardhyland.com/diary/2010/07/15/how-to-harness-the-retina-display-in-your-app/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 23:00:42 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=585</guid>
		<description><![CDATA[It is remarkably easy to do so and I implore all all iPhone developers to please upgrade all their apps to support the Retina Display on the iPhone 4, otherwise your app just looks blurry.
What Apple achieved with the Retina Display is a remarkable feat. The screen is still exactly the same size of 3.5 [...]]]></description>
			<content:encoded><![CDATA[<p>It is remarkably easy to do so and I implore all all iPhone developers to please upgrade all their apps to support the Retina Display on the iPhone 4, otherwise your app just looks blurry.</p>
<p>What Apple achieved with the Retina Display is a remarkable feat. The screen is still exactly the same size of 3.5 inches but where you used to have 1 pixel you now have 4.  This means UI elements are scaled exactly by 2.</p>
<p>Developers were always told to design for a screen resolution of 320&#215;480 pixels, so don&#8217;t I need to change my UIViewControllers to have a different size?</p>
<p>Well no, and this is how Apple have been incredibly clever. The screen dimensions are now 320&#215;480 points, and not pixels so in your UIViewController you still have the size 320&#215;480. With me so far?</p>
<h2>Images</h2>
<p>Ok so lets say I have an image that needs to span the width of the screen and is only 100 pixels high on an iPhone 3G or 3Gs we simply embed an image of 320pixels by 100pixels.  So that image that we&#8217;ve called banner.png, for example, looks perfect on those old devices but they look blurry on the iPhone 4.</p>
<p>I can hear you asking, if the screen is 320points wide but is actually 640pixels wide, how do I provide both an iPhone 4 and iPhone 3G(s) version of this and how much code does it take.</p>
<p>Well my answer is, very easy and zero, that&#8217;s right, <strong>zero</strong> code modifications.</p>
<p>Now you did have a high resolution, or vector version of your artwork right? Ok well open it up and scale it to exactly double the size of the original file. So you&#8217;ll now have an image that is 640&#215;200 pixels and save it as banner@2x.png (as the original was called banner.png). Add the new image to your resources in your XCode project.</p>
<p>You can call your image in exactly the same way as before</p>
<pre class="cpp" name="code">UIImageView *myImage = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,100)];
[myImage setImage:[UIImage imageNamed:@"banner.png"]];
[self.view addSubview:myImage];
[myImage release];
</pre>
<p>When you run your app on your iPhone 4 (or the iPhone 4) simulator the image will magically use the banner@2x.png version instead.  Clever isn&#8217;t it!</p>
<h2>Default splash images</h2>
<p>This is exactly the same as for images, just include a Default@2x.png image in your bundle and the iPhone 4 will use it instead.</p>
<h2>Springboard App Icon</h2>
<p>Ok now this one is a little more complicated, but not by much.  If you&#8217;ve already designed a Universal (iPhone and iPad) app then you&#8217;ll be familiar with this technique, and actually there are a couple of ways to do it but I&#8217;ll explain the one from the Apple Docs.</p>
<p>If you want to still provide support to iOS 3.1.x and below you&#8217;ll still need a </p>
<pre class="cpp" name="code">CFBundleIconFile</pre>
<p>with Icon.png in it for your Info.plist but you should now also include an array entry of</p>
<pre class="cpp" name="code">CFBundleIconFiles</pre>
<p>Include an Icon.png file, this is your non-iPhone 4 57&#215;57 file<br />
Include an Icon@2x.png file, this is your iPhone 4 114&#215;114 file.</p>
<p>Yep once again it really is that simple.</p>
<h2>Conclusion</h2>
<p>If you have an app that simply uses SDK UI Elements and/or images, which the majority of iPhone app do, then you simply have no excuse not to support the Retina Display&#8230; so what are you waiting for, go cut graphics and submit!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2010/07/15/how-to-harness-the-retina-display-in-your-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple&#8217;s iPad UK pricing</title>
		<link>http://www.richardhyland.com/diary/2010/05/08/apples-ipad-uk-pricing/</link>
		<comments>http://www.richardhyland.com/diary/2010/05/08/apples-ipad-uk-pricing/#comments</comments>
		<pubDate>Sat, 08 May 2010 08:47:57 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=583</guid>
		<description><![CDATA[I&#8217;ve read a lot of comments online since Apple announced it&#8217;s international iPad pricing, and most of those comments revolve around &#8216;Rip-Off Britain&#8217;.
Now it is true that must tech imported from the USA seems to cost more with this mythical international tax and at first glance the iPad pricing in the UK is a lot [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve read a lot of comments online since Apple <a href="http://www.apple.com/uk/pr/library/2010/05/07ipad.html" target="_blank">announced</a> it&#8217;s international iPad pricing, and most of those comments revolve around &#8216;Rip-Off Britain&#8217;.</p>
<p>Now it is true that must tech imported from the USA seems to cost more with this mythical international tax and at first glance the iPad pricing in the UK is a lot more but let&#8217;s break it down for the 16Gb WiFi iPad.</p>
<p>In the US this is $499. The UK price announced is £429.  At a direct comparison at today&#8217;s exchange rates of 1.48, that comes to $648.  Wow that seems an awful lot more.  However that simply isn&#8217;t a fair comparison.</p>
<p>In the US all prices exclude sales tax which our friends in America accept is always added at point of sale and calculate the price in their head all the time.  In the UK we have VAT so the tax is always added (and at the moment it&#8217;s 17.5%).  So let&#8217;s take off the VAT from £429 and it comes to £365.</p>
<p>Convert that to USD and we see the UK iPad price is actually $540.  So the UK iPad is actually $41 more expensive in the UK than the US&#8230; that&#8217;s a whole £27, although yesterday it was £25.</p>
<p>I&#8217;m sure there are some import taxes or costs and £27 more isn&#8217;t really a lot of money, sure I&#8217;d prefer not to have to pay it but it isn&#8217;t what I&#8217;d call rip-off Britain compared with the US price.</p>
<p>If anyone is to blame it&#8217;s the level of VAT we get charged in the UK.</p>
<p>If we compare our £429 iPad with VAT to what it costs, in say California with federal and local sales tax of 10.75% we see that in the US the iPad costs $552.64 which is £373.</p>
<p>So the entire reason we feel we are being ripped off for our technology is nothing to do with Apple in this case and everything to do with the Government and our VAT.</p>
<p>Of course importing it isn&#8217;t a solution either, because you did remember to pay your VAT when it came through customs didn&#8217;t you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2010/05/08/apples-ipad-uk-pricing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple&#8217;s delay to international iPad shipping and how it harms developers</title>
		<link>http://www.richardhyland.com/diary/2010/04/14/apples-delay-to-international-ipad-shipping-and-how-it-harms-developers/</link>
		<comments>http://www.richardhyland.com/diary/2010/04/14/apples-delay-to-international-ipad-shipping-and-how-it-harms-developers/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 13:27:51 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=581</guid>
		<description><![CDATA[Apple has today announced that they are delaying international shipping of the iPad until the end of May.
As a user, and future owner of one of these devices I&#8217;m disappointed.
As a developer, I&#8217;m angry and let me explain why.  International developers are now at a severe disadvantage to US based developers without great expense to [...]]]></description>
			<content:encoded><![CDATA[<p>Apple has today announced that they are <a href="http://gizmodo.com/5516860/apple-delays-international-ipad-launch-by-one-month" target="_blank">delaying international shipping of the iPad</a> until the end of May.</p>
<p>As a user, and future owner of one of these devices I&#8217;m disappointed.</p>
<p>As a developer, I&#8217;m angry and let me explain why.  International developers are now at a severe disadvantage to US based developers without great expense to themselves, of finding a way to import the iPad from the USA.</p>
<p>US based developers have been able to see how their app looks, feels and works on a physical iPad whilst those of us not in the US have only had the simulator which is simply not good enough.  Anyone who has developed anything more than a one screen app for the iPhone will know that the simulator often behaves differently to the ARM architecture of the iPhone itself.</p>
<p>I&#8217;m not asking for Apple to give developers discounts, special advance access, free shipping, etc.  All I am asking is for Apple to allow a level playing field for developers and so that international developers that have PAID to register in the iPhone Developer Program should have a way of gaining access to the devices to be able to develop and test on.</p>
<p>At the moment there is no fair playing field between developers in the US and those of us who are not, of which I wouldn&#8217;t be surprised if there are more outside the US than in it.</p>
<p>Robert Scoble has written a great blog post on why <a href="http://scobleizer.com/2010/04/14/why-was-apples-prediction-on-ipads-so-wrong/" target="_blank">Apple&#8217;s prediction was so wrong</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2010/04/14/apples-delay-to-international-ipad-shipping-and-how-it-harms-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your rights as a photographer in the UK</title>
		<link>http://www.richardhyland.com/diary/2009/12/15/your-rights-as-a-photographer-in-the-uk/</link>
		<comments>http://www.richardhyland.com/diary/2009/12/15/your-rights-as-a-photographer-in-the-uk/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 14:13:38 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=577</guid>
		<description><![CDATA[As someone who is an amateur photographer and also as someone that has been stopped by the police for taking photos of public architecture in London I came across this post by Documental.ly

The guide below is available to print out on the website PhotographerNotATerrorist.org 
I highly recommend carrying it with you in your camera bag at [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Me taking a photo" src="http://www.richardhyland.com/headers/richard.jpg" alt="" width="205" height="154" />As someone who is an amateur photographer and also as someone that has been stopped by the police for taking photos of public architecture in London I came across this post by <a href="http://www.stumbleupon.com/su/1SUMDy/documental.ly/your-rights-as-a-photographer-in-the-uk" target="_blank">Documental.ly</a></p>
<p><span id="more-577"></span></p>
<p><span style="font-size: x-small;"><em><span style="font-family: Verdana;">The guide below is available to print out on the website <a href="http://photographernotaterrorist.org/bust-card/">PhotographerNotATerrorist.org</a></span></em></span><span style="font-size: x-small;"><em><span style="font-family: Verdana;"> </span></em></span></p>
<p><span style="font-size: x-small;"><em><span style="font-family: Verdana;">I highly recommend carrying it with you in your camera bag at all times.</span></em></span><span style="font-size: x-small;"><em><span style="font-family: Verdana;"> </span></em></span></p>
<p><span style="font-size: x-small;"><em><span style="font-family: Verdana;">Also make sure you follow <a href="http://twitter.com/phnat">@PHNAT</a> on twitter and join the <span style="font-family: Helvetica;"><a href="http://www.facebook.com/pages/Im-a-Photographer-Not-a-Terrorist/128534046017">Facebook group</a></span></span></em></span></p>
<div><span style="text-decoration: underline;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Your Rights As A Photographer In The UK</span></span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">If you are stopped and searched under section 44 of the Terrorism Act, you <strong>do not</strong> have to give your:</span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><br />
</span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Name, address, date of birth, <span style="font-family: Helvetica Neue; font-size: 10px;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">DNA or r</span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">eason for being there, n</span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">or do you have to explain where you are going.</span></span></span></span></span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><span style="font-family: Helvetica Neue; font-size: 10px;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><br />
</span></span></span></span></span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong>However</strong>, if the police decide that there is reasonable suspicion to arrest you for an offence, you do have to give your name and address.</span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><br />
</span></span></span></div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">You do not have to comply with any attempt to photograph you, although you cannot flee the scene</span></span></span></li>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span><span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">The Police cannot delete any images on your camera. They can only view them in very limited circumstances.</span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></li>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">If you are driving a vehicle, when stopped you must give your name and address.</span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></li>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Failure to stop or obstructing a police constable acting under section 44 is a criminal offence.</span></span></span></li>
</ul>
</div>
<div><span style="font-family: Verdana; font-size: medium;"><span style="font-size: 14px;"> </span></span></p>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong>Police Power</strong></span></span></span></div>
<div></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Under s44, a police constable in uniform is entitled to:</span></span></span></div>
<div></div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Pat you down</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Detain you for the duration of the search</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Remove outer clothing</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Require you to remove any item which he reasonably believes you are wearing to conceal your identity</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Look through your pockets and anything you are carrying</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Seize any article he reasonably suspects is intended to be used in connection with terrorism</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Search your vehicle and anyone in it</span></span></span></li>
</ul>
</div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong>What You Should Do</strong></span></span></span></div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Insist on a written record of the search</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Make sure it is legible and includes details of the officers’ shoulder number and the reason for the stop.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Note exactly why they said you were being stopped and searched – this may be more extensive than the reference in the record slip.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Ask to see the officers’ warrant card and note the number. (This is useful when making a complaint if they have moved stations and their shoulder number changes)</span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></li>
</ul>
</div>
<div>
<span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span><br />
<span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong>Note</strong></span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong><br />
</strong></span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">A Police Community Support Officer (PCSO) may not perform a s44 search without a police officer present.</span></span></span></div>
</div>
<p><span style="font-family: Verdana; font-size: medium;"><span style="font-size: 14px;"> </span></span></p>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong>Other Laws</strong></span></span></span></div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><strong><br />
</strong></span></span></span></div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">It is not against the law to photograph police, vehicles or equipment, unless the images are </span></span></span><span style="font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">“</span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">likely to be useful to a person committing or preparing an act of terrorism”.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">It is not against the law to take photographs in an area where an authority under section 44 is in place.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Using a tripod or other equipment on a public right of way can be considered obstruction. Simply standing still on a public right of way (as to take a photo) can be deemed an obstruction in certain circumstances.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Although it is rarely used, the Official Secrets Act prohibits photography that threatens the security of the state. This includes:</span></span></span></li>
</ul>
</div>
<div></div>
<div><span style="font-family: Lucida Grande; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><span>&gt;</span> </span></span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Military establishments and munitions stores, aircraft and ships</span></span></span></div>
<div><span style="font-family: Lucida Grande; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">&gt;</span></span></span><span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Civil Aviation property and naval dockyards</span></span></span></div>
<div><span style="font-family: Lucida Grande; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">&gt; </span></span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Railways, road, waterway, power stations, waterworks and nuclear power stations that have been defined as prohibited places by the Secretary of State.</span></span></span></div>
<div><span style="font-family: Lucida Grande; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">&gt;</span></span></span><span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Telephone exchanges and communications centres operated by the Crown</span></span></span></div>
<div><span style="font-family: Lucida Grande; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">&gt;</span></span></span><span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"> </span></span></span></span></span><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Anywhere else that is a prohibited place by order of the Secretary of State</span></span></span></div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">You can photograph private property if you are on public property or a public right of way</span></span></span></li>
</ul>
</div>
<p><span style="font-family: Verdana; font-size: medium;"><span style="font-size: 14px;"> </span></span></p>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Private property owners may impose restrictions on photography, this only applies to photographs taken from somewhere on their property. Restrictions may not always be obvious but will still apply. They cannot be imposed after the photography has occurred.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">Private property owners or their agents (for example security guards) may not view or delete images on your camera or demand your name and address. They may require you to leave immediately and by the most direct route without giving any reason if they choose.</span></span></span></li>
</ul>
</div>
<div>
<ul>
<li><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;">There is no right to privacy in a public place, however, there are circumstances in which a person has a reasonable expectation of privacy, particularly if they are inside their own home. Childrens privacy rights are particularly protected. You therefore need to be aware that publication without consent may leave you open to legal action.</span></span></span></li>
</ul>
</div>
<div><span style="font-size: medium;"><span style="font-size: 14px;"><span style="font-family: Verdana;"><br />
</span></span></span></div>
<div><span style="font-size: small;"><span><span><span style="font-family: Verdana;">Download the guide from</span></span></span><em><span style="font-family: Verdana;"> <a href="http://photographernotaterrorist.org/bust-card/">PhotographerNotATerrorist.org</a></span></em></span></div>
<div></div>
<div></div>
<div>
<div><span style="font-family: Verdana;"><em><span style="font-size: x-small;"><span style="font-size: 10px;">Disclaimer &#8211; While care has been taken to ensure that the information contained in this guide is accurate it does not provide a comprehensive in- depth discussion of the relevant law. The information it contains is of a general nature and is not intended to be legal advice. The guide is provided without warranty as to the accuracy of the information it contains. The author, publisher and distributor of this guide will not be held responsible for any loss suffered by any person that is directly or indirectly attributable to reliance on the information contained in this guide.</span></span></em></span></div>
<div><span style="font-family: Verdana;"><em><span style="font-size: x-small;"><span style="font-size: 10px;">This guide was compiled by David Hoffman, Marc Vallée and Jonathan Warren with additional legal advice from Anna Mazolla at Hickman &amp; Rose.</span></span></em></span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/12/15/your-rights-as-a-photographer-in-the-uk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add a pin to embedded map</title>
		<link>http://www.richardhyland.com/diary/2009/10/27/how-to-add-a-pin-to-embedded-map/</link>
		<comments>http://www.richardhyland.com/diary/2009/10/27/how-to-add-a-pin-to-embedded-map/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 09:17:10 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=555</guid>
		<description><![CDATA[Part one of this section on MapKits showed how to embed a map and place a floating toolbar for switching the map views, however it didn&#8217;t cover how to drop the pin where you wanted it.

Create the Object
First lets create a new NSObject for the place mark. Let&#8217;s call it &#8216;PlaceMark&#8217;
PlaceMark.h

#import &#60;Foundation/Foundation.h&#62;
#import &#60;MapKit/MapKit.h&#62;

@interface PlaceMark : [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.richardhyland.com/diary/2009/10/17/how-to-embed-a-map-on-the-iphone/">Part one</a> of this section on MapKits showed how to embed a map and place a floating toolbar for switching the map views, however it didn&#8217;t cover how to drop the pin where you wanted it.<br />
<img class="aligncenter size-full wp-image-547" title="MKMapKit" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/10/map.png" alt="MKMapKit" width="320" height="412" /></p>
<h2>Create the Object</h2>
<p>First lets create a new NSObject for the place mark. Let&#8217;s call it &#8216;PlaceMark&#8217;</p>
<p><em>PlaceMark.h</em></p>
<pre class="cpp" name="code">
#import &lt;Foundation/Foundation.h&gt;
#import &lt;MapKit/MapKit.h&gt;

@interface PlaceMark : NSObject<MKAnnotation> {
	CLLocationCoordinate2D coordinate;
	NSString *subtitletext;
	NSString *titletext;
}
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
@property (readwrite, retain) NSString *titletext;
@property (readwrite, retain) NSString *subtitletext;
-(id)initWithCoordinate:(CLLocationCoordinate2D) coordinate;
- (NSString *)subtitle;
- (NSString *)title;
-(void)setTitle:(NSString*)strTitle;
-(void)setSubTitle:(NSString*)strSubTitle;

@end
</pre>
<p><em>PlaceMark.m</em></p>
<pre class="cpp" name="code">
#import "PlaceMark.h"

@implementation PlaceMark
@synthesize coordinate, titletext, subtitletext;

- (NSString *)subtitle{
	return subtitletext;
}
- (NSString *)title{
	return titletext;
}

-(void)setTitle:(NSString*)strTitle {
	self.titletext = strTitle;
}

-(void)setSubTitle:(NSString*)strSubTitle {
	self.subtitletext = strSubTitle;
}

-(id)initWithCoordinate:(CLLocationCoordinate2D) c{
	coordinate=c;
	return self;
}
@end
</pre>
<h2>Adding a pin to your map</h2>
<p>Firstly remember to add</p>
<pre class="cpp" name="code">
#import "PlaceMark.h"
</pre>
<p>To your map controller, from the previous example inside the displayMap function under the region.center call</p>
<pre class="cpp" name="code">
PlaceMark *addAnnotation = [[[PlaceMark alloc] initWithCoordinate:location] retain];
[addAnnotation setTitle:@"The Pin Title"];
[addAnnotation setSubTitle:@"The pin subtitle goes here"];

[mapView addAnnotation:addAnnotation];
</pre>
<p>Then create the following delegate method</p>
<pre name="code" class="cpp">
- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;) annotation{
    MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"MyPin"];
    annView.animatesDrop=TRUE;
    annView.canShowCallout = YES;
	[annView setSelected:YES];
	annView.pinColor = MKPinAnnotationColorPurple;
    annView.calloutOffset = CGPointMake(-5, 5);
    return annView;
}
</pre>
<p>Voila you now have a pin dropped on the map and automatically selected.  If you don&#8217;t want the title automatically displayed then change</p>
<pre name="code" class="cpp">
[annView setSelected:YES];
</pre>
<p><em>The final part demonstrates how to create a <a href="http://www.richardhyland.com/diary/2009/11/20/creating-a-mini-map-using-mapkit-on-the-iphone/">mini map</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/10/27/how-to-add-a-pin-to-embedded-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a mini map using MapKit on the iPhone</title>
		<link>http://www.richardhyland.com/diary/2009/11/20/creating-a-mini-map-using-mapkit-on-the-iphone/</link>
		<comments>http://www.richardhyland.com/diary/2009/11/20/creating-a-mini-map-using-mapkit-on-the-iphone/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 13:03:38 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=571</guid>
		<description><![CDATA[So as promised here is the final part of my MapKit tips and tricks using the iPhone SDK.
Sorry it&#8217;s a little later than I intended as I wanted my version of the feature live in the AppStore before I published the article.
So we&#8217;ve seen before how to create a simple map, well now let&#8217;s see [...]]]></description>
			<content:encoded><![CDATA[<p>So as promised here is the final part of my MapKit tips and tricks using the iPhone SDK.</p>
<p>Sorry it&#8217;s a little later than I intended as I wanted my version of the feature live in the AppStore before I published the article.</p>
<p>So we&#8217;ve seen before how to create a simple map, well now let&#8217;s see how to create a really small thumbnail sized version like this <em>(sorry there is no anti-aliasing, the iPhone simulator doesn&#8217;t support it on MapKit, works fine on the actual device though!)</em></p>
<p><img class="aligncenter size-full wp-image-573" title="smallmap" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/11/smallmap.jpg" alt="smallmap" width="111" height="58" /></p>
<p>In my version, I take this code and add it to a much larger view controller like this</p>
<p><img class="aligncenter size-full wp-image-572" title="bigmap" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/11/bigmap.jpg" alt="bigmap" width="322" height="477" /></p>
<p><em>A bit of shameless plugging: this comes from <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=323248061&#038;mt=8&#038;s=143441">Tweetings</a> for the iPhone</em></p>
<p>I won&#8217;t cover anything more to this other than getting the map to a state where you can add it to any view of yours using the [object addSubview:mapView] call.</p>
<p><strong>Generating the map</strong></p>
<p>This is the same as generating a large map, that we&#8217;ve covered before, except the frame will be of a different size, however the most important factor here is we are going to scale the map</p>
<pre class="cpp" name="code">
float scaleBy = 0.80;
MKMapView *mapView = [[[MKMapView alloc] initWithFrame:CGRectMake(-5, 0, 100/ scaleBy, 50/scaleBy)] autorelease];
mapView.delegate=self;
mapView.layer.cornerRadius = 10.0; // Make the corners rounded
mapView.opaque = NO; // If you are using in a UITableView never set to YES!
mapView.scrollEnabled = NO; // Don't allow user interaction
mapView.zoomEnabled = NO;
mapView.layer.borderColor = [UIColor colorWithWhite:0.0f alpha:0.5f].CGColor;
mapView.layer.borderWidth = 1.0f/ scaleBy;
mapView.layer.transform = CATransform3DMakeScale(scaleBy, scaleBy, 1.0);
</pre>
<p>At this point you can actually now add it to your view and set any other properties in the same way as you would normally, job done&#8230;. yes it really is that simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/11/20/creating-a-mini-map-using-mapkit-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My take on Chrome OS</title>
		<link>http://www.richardhyland.com/diary/2009/11/20/my-take-on-chrome-os/</link>
		<comments>http://www.richardhyland.com/diary/2009/11/20/my-take-on-chrome-os/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 12:47:24 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Computers & Internet]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=568</guid>
		<description><![CDATA[So Google have unveiled Chrome OS&#8230; which in actual fact is just a web browser where all you can do is interact with web apps.  This isn&#8217;t a review, in fact if you want that go to Engadget
It&#8217;s even less than a thin client of old (read: Citrix). When did we suddenly decide that [...]]]></description>
			<content:encoded><![CDATA[<p>So Google have unveiled Chrome OS&#8230; which in actual fact is just a web browser where all you can do is interact with web apps.  This isn&#8217;t a review, in fact if you want that go to <a href="http://www.engadget.com/2009/11/19/googles-chrome-os-revealed/" target="_blank">Engadget</a></p>
<p>It&#8217;s even less than a thin client of old (read: Citrix). When did we suddenly decide that thin clients were a good idea again?</p>
<p>I&#8217;ll just put one single thought and it was said by Marc Andreessen in 1995</p>
<blockquote><p>&#8220;[Netscape will soon reduce Windows to] a poorly debugged set of device drivers.&#8221;</p></blockquote>
<p>Yeah that went well didn&#8217;t it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/11/20/my-take-on-chrome-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeAgent: online accounting application</title>
		<link>http://www.richardhyland.com/diary/2009/11/04/freeagent-online-accounting-application/</link>
		<comments>http://www.richardhyland.com/diary/2009/11/04/freeagent-online-accounting-application/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 18:30:13 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Computers & Internet]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=559</guid>
		<description><![CDATA[I like many people dread the 31st of January in the UK as it&#8217;s time to make sure I&#8217;ve not only submitted my tax return to HMRC but I&#8217;ve also paid any tax I owe.
It&#8217;s a horrible task but it&#8217;s just been made a whole lot easier using a great online application called FreeAgent.
For me [...]]]></description>
			<content:encoded><![CDATA[<p>I like many people dread the 31st of January in the UK as it&#8217;s time to make sure I&#8217;ve not only submitted my tax return to HMRC but I&#8217;ve also paid any tax I owe.</p>
<p>It&#8217;s a horrible task but it&#8217;s just been made a whole lot easier using a great online application called <a href="http://www.freeagentcentral.com?referrer=33kom1a7" target="_blank">FreeAgent</a>.</p>
<p>For me it allows me to keep any invoices in check, remittance notes and all my expenses (including uploading a scanned PDF copy of the actual receipt).</p>
<p>Then come Self-Assessment time I can see my expenses all in one place and how much I can be expected to pay for my taxes.  It&#8217;s so easy it&#8217;s a dream, I can&#8217;t recommend it highly enough!</p>
<p>What&#8217;s more if you click through for a 30 day free trial from this link now, you&#8217;ll get a 10% discount!</p>
<p><a title="FreeAgent: money management and accounting for freelancers, contractors and consultants" href="http://www.freeagentcentral.com/?referrer=33kom1a7"><img src="http://www.freeagentcentral.com/images/i-heart-fa.jpg" alt="FreeAgent sign-up" width="205" height="85" border="0" style="border:0px;" /></a></p>
<p>Now I&#8217;ll say upfront I don&#8217;t have much experience with this sort of application and I&#8217;ve never used Sage, etc . When you sign up for FreeAgent you get your own URL (http://yourcompany.freeagentcentral.com) and login, but this has one of the easiest to use interfaces I&#8217;ve seen for something that is a very complex and powerful web application.</p>
<p>In a matter of an hour I had all my yearly expenses in the system and added my income and even my PAYE P60 for my Self-Assessment.</p>
<p>I&#8217;ve only touched a handful of the features on offer, it also allows bank account integration which I&#8217;m sure is incredibly powerful, I&#8217;ve just not used it yet!</p>
<p><strong>The Features</strong> (shamelessly copied from the FreeAgent website)<br />
	<img class="alignright size-full wp-image-560" title="FreeAgent Features" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/11/FAfeatures.png" alt="FreeAgent Features" width="258" height="284" border="0" style="border:0px;" /></p>
<ul>
<li><strong>Manage Projects &amp; Time<br />
</strong>Manage your projects and contacts, track the time you spend and create flexible timesheet reports.</li>
<li><strong>Simple, Powerful Invoicing<br />
</strong>Create great looking invoices with no fuss. Email them to the client and easily track through to payment.</li>
<li><strong>Keep track of Expenses<br />
</strong>Keep tabs on your business and out-of-pocket expenses and quickly rebill to clients.</li>
<li><strong>Superior Online Banking<br />
</strong>Online banking that’s better than the banks. Compare accounts and track balances.</li>
<li><strong>Realtime Accounts<br />
</strong>No complicated procedures, FreeAgent simply works out your accounts as you run your business.</li>
<li><strong>Unrivalled Tax Features</strong><br />
Our unique Tax timeline lets you see important UK income, VAT and corporate tax dates and how much is due.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/11/04/freeagent-online-accounting-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to embed a map on the iPhone</title>
		<link>http://www.richardhyland.com/diary/2009/10/17/how-to-embed-a-map-on-the-iphone/</link>
		<comments>http://www.richardhyland.com/diary/2009/10/17/how-to-embed-a-map-on-the-iphone/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 19:05:46 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=548</guid>
		<description><![CDATA[In the first of a few posts I intend to make I&#8217;ll demonstrate some examples using the iPhone SDK.
This example will demonstrate how to embed a map, using the MKMapKit framework inside a UIView using the iPhone SDK.  Note you must be using iPhone OS 3.0 or higher for this to work.  The [...]]]></description>
			<content:encoded><![CDATA[<p>In the first of a few posts I intend to make I&#8217;ll demonstrate some examples using the iPhone SDK.</p>
<p>This example will demonstrate how to embed a map, using the MKMapKit framework inside a UIView using the iPhone SDK.  Note you must be using iPhone OS 3.0 or higher for this to work.  The ultimate aim is to get a UIView that looks similar to this.</p>
<p>For this example I will assume you are already familiar with navigation and UIViews in the SDK (and so I won&#8217;t cover how to get the navigation bar at the top of this screenshot)</p>
<p><img class="aligncenter size-full wp-image-547" title="MKMapKit" src="http://www.richardhyland.com/diary/wp-content/uploads/2009/10/map.png" alt="MKMapKit" width="320" height="412" /></p>
<h2>Add the framework</h2>
<p>First up you must go to the Frameworks folder of your XCode project and add the existing framework of MKMapKit.</p>
<p>Then inside the header file for your view add</p>
<pre class="cpp" name="code">
#import &lt;MapKit/MapKit.h&gt;
</pre>
<h2>Adding MapKit references to the header</h2>
<p>Now we must add the mapKit instance to the header as well as the MapKit delegate</p>
<pre class="cpp" name="code">
@interface MapKitViewController : UIViewController &lt;MKMapViewDelegate&gt; {
	MKMapView *mapView;
}
-(void)displayMap;
</pre>
<h2>Initialize the Map</h2>
<pre class="cpp" name="code">
- (void)viewDidLoad {
	mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
	mapView.delegate=self;

	[self.view addSubview:mapView];
	[NSThread detachNewThreadSelector:@selector(displayMap) toTarget:self withObject:nil];
}

-(void)displayMap {
	MKCoordinateRegion region;
	MKCoordinateSpan span;
	span.latitudeDelta=0.2;
	span.longitudeDelta=0.2;

	CLLocationCoordinate2D location;
	location.latitude = -35;
	location.longitude = 146.2381;
	region.span=span;
	region.center=location;

	[mapView setRegion:region animated:TRUE];
	[mapView regionThatFits:region];
}

- (void)dealloc {
	[mapView release];
        [super dealloc];
}
</pre>
<p>This will give us a map fitting the screen with the region and zoom level set to best fit the coordinates given.  Note that I have physically defined the coordinates here in this example, you can use something like the Google GeoCode API to convert addresses, etc to coordinates.  I won&#8217;t cover that here.</p>
<h2>Changing the map type</h2>
<p>In the example above is a tool bar allowing you to switch map types</p>
<p>Let&#8217;s define the toolbar in the header file inside the @implementation</p>
<pre class="cpp" name="code">
UISegmentedControl *buttonBarSegmentedControl;
</pre>
<p>Now inside the main code inside ViewDidLoad we add</p>
<pre class="cpp" name="code">
buttonBarSegmentedControl = [[UISegmentedControl alloc] initWithItems:
	[NSArray arrayWithObjects:@"Standard", @"Satellite", @"Hybrid", nil]];
	[buttonBarSegmentedControl setFrame:CGRectMake(30, 10, 280-30, 30)];
        buttonBarSegmentedControl.selectedSegmentIndex = 0.0;	// start by showing the normal picker
	[buttonBarSegmentedControl addTarget:self action:@selector(toggleToolBarChange:) forControlEvents:UIControlEventValueChanged];
	buttonBarSegmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
	buttonBarSegmentedControl.backgroundColor = [UIColor clearColor];
	[buttonBarSegmentedControl setAlpha:0.8];

	[self.view addSubview:buttonBarSegmentedControl];
</pre>
<p>Then we must add the function for what happens when we tap on the tool bar</p>
<pre class="cpp" name="code">
- (void)toggleToolBarChange:(id)sender
{
	UISegmentedControl *segControl = sender;

	switch (segControl.selectedSegmentIndex)
	{
		case 0:	// Map
		{
			[mapView setMapType:MKMapTypeStandard];
			break;
		}
		case 1: // Satellite
		{
			[mapView setMapType:MKMapTypeSatellite];
			break;
		}
		case 2: // Hybrid
		{
			[mapView setMapType:MKMapTypeHybrid];
			break;
		}
	}
}
</pre>
<p>In the <a href="http://www.richardhyland.com/diary/2009/10/27/how-to-add-a-pin-to-embedded-map/">next example</a>, I&#8217;ll cover how to add the annotations (the small pins) to the map</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/10/17/how-to-embed-a-map-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UIActionSheet&#8217;s cancel button presses not detected properly</title>
		<link>http://www.richardhyland.com/diary/2009/07/22/uiactionsheets-cancel-button-presses-not-detected-properly/</link>
		<comments>http://www.richardhyland.com/diary/2009/07/22/uiactionsheets-cancel-button-presses-not-detected-properly/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 18:09:17 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.richardhyland.com/diary/?p=515</guid>
		<description><![CDATA[Last night I came across a really annoying bug with UIActionSheet when used in conjunction with a UITabBarController.
Basically there is a killer bug which means you can&#8217;t click the Cancel button on a UIActionSheet and forces the user to either close the App or use one of the destructive action buttons to get rid of [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I came across a really annoying bug with UIActionSheet when used in conjunction with a UITabBarController.</p>
<p>Basically there is a killer bug which means you can&#8217;t click the Cancel button on a UIActionSheet and forces the user to either close the App or use one of the destructive action buttons to get rid of the alert.</p>
<p>It appears to be a changed from OS &lt;= 2.1 to &gt;= 2.2. In iPhone OS 2.1 and earlier, the UIActionSheet comes up from the top of the tab bar, but in 2.2, it comes up from the bottom of the tab bar, and thus covers the tab view but the tab view still takes focus.  If you try to press the cancel button below the top of the tab bar (barely visible through the semi-transparent UIActionSheet), the press does not register. If you click above the underlying tab bar, the press does work.</p>
<p>This is how you fix it.</p>
<p>1) In your AppDelegate.h function</p>
<pre class="cpp" name="code">+ (UITabBarController *)tabbarController;</pre>
<p>Note that tabbarController should be different than your ACTUAL UITabBarController name.</p>
<p>Next edit your AppDelegate.m functiuon and above your @implementation</p>
<pre class="cpp" name="code">static AppDelegate *s_appdelegate = nil;

@implementation AppDelegate</pre>
<p>Inside applicationDidFinishLaunching add</p>
<pre class="cpp">s_appdelegate = self;</pre>
<p>At the bottom of AppDelegate.m before @end add</p>
<pre class="cpp">+ (UITabBarController *)tabbarController
{
	return s_appdelegate ? s_appdelegate.tabBarController : nil;
}</pre>
<p>Finally in your child view in which you wish to display your UIActionSheet add</p>
<pre class="cpp" name="code">	UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"Delete?"
		delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Yes" otherButtonTitles:nil, nil];

	UIView *viewBase = self.view;
	viewBase = [[AppDelegate tabbarController] view];
	[sheet showInView:viewBase];
	[sheet release];</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.richardhyland.com/diary/2009/07/22/uiactionsheets-cancel-button-presses-not-detected-properly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
