<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=IPhone_development_tips</id>
	<title>IPhone development tips - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=IPhone_development_tips"/>
	<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;action=history"/>
	<updated>2026-06-15T21:11:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3844&amp;oldid=prev</id>
		<title>Lensovet: tethering note</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3844&amp;oldid=prev"/>
		<updated>2010-03-28T08:10:05Z</updated>

		<summary type="html">&lt;p&gt;tethering note&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 08:10, 28 March 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot; &gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*GPS shuts off when user locks the screen manually or the device auto-locks&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*GPS shuts off when user locks the screen manually or the device auto-locks&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You can use &amp;lt;tt&amp;gt;[UIApplication sharedApplication].idleTimerDisabled = YES;&amp;lt;/tt&amp;gt; to keep the screen on, but this is bad for the screen itself and takes a nice toll on battery life. Instead, set up an &amp;lt;tt&amp;gt;AVAudioSession&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;AVAudioSessionCategoryPlayback&amp;lt;/tt&amp;gt; category, then set the &amp;lt;tt&amp;gt;kAudioSessionProperty_OverrideCategoryMixWithOthers&amp;lt;/tt&amp;gt; property (so that the user's iPod can keep playing) and a more aggressive I/O buffer using &amp;lt;tt&amp;gt;kAudioSessionProperty_PreferredHardwareIOBufferDuration&amp;lt;/tt&amp;gt;. Then, use &amp;lt;tt&amp;gt;AVAudioPlayer&amp;lt;/tt&amp;gt; to play a &amp;quot;recording&amp;quot; of total silence on endless loop for when you need to keep GPS running. &amp;lt;em&amp;gt;Note&amp;lt;/em&amp;gt;: accelerometer and WiFi still shut off when the screen is locked.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:You can use &amp;lt;tt&amp;gt;[UIApplication sharedApplication].idleTimerDisabled = YES;&amp;lt;/tt&amp;gt; to keep the screen on, but this is bad for the screen itself and takes a nice toll on battery life. Instead, set up an &amp;lt;tt&amp;gt;AVAudioSession&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;AVAudioSessionCategoryPlayback&amp;lt;/tt&amp;gt; category, then set the &amp;lt;tt&amp;gt;kAudioSessionProperty_OverrideCategoryMixWithOthers&amp;lt;/tt&amp;gt; property (so that the user's iPod can keep playing) and a more aggressive I/O buffer using &amp;lt;tt&amp;gt;kAudioSessionProperty_PreferredHardwareIOBufferDuration&amp;lt;/tt&amp;gt;. Then, use &amp;lt;tt&amp;gt;AVAudioPlayer&amp;lt;/tt&amp;gt; to play a &amp;quot;recording&amp;quot; of total silence on endless loop for when you need to keep GPS running. &amp;lt;em&amp;gt;Note&amp;lt;/em&amp;gt;: accelerometer and WiFi still shut off when the screen is locked.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Note also that to test this properly, you *must* untether your device, as when your device is connected to power, it never enters low-power mode (WiFi and GPS stay on, even if you don't play any sound).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Calling &amp;lt;tt&amp;gt;[[AVAudioSession sharedInstance] setPreferredIOBufferDuration:&amp;lt;/tt&amp;gt; always errors, regardless of what value you use!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Calling &amp;lt;tt&amp;gt;[[AVAudioSession sharedInstance] setPreferredIOBufferDuration:&amp;lt;/tt&amp;gt; always errors, regardless of what value you use!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:See [http://stackoverflow.com/questions/1714507/recording-audio-on-iphone-error-with-setpreferrediobufferduration/2530737#2530737 my response on StackOverflow]. Basically this is a bug in the interface and you '''have''' to use the plain C method instead of the Objective-C one to get this to work.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:See [http://stackoverflow.com/questions/1714507/recording-audio-on-iphone-error-with-setpreferrediobufferduration/2530737#2530737 my response on StackOverflow]. Basically this is a bug in the interface and you '''have''' to use the plain C method instead of the Objective-C one to get this to work.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3843&amp;oldid=prev</id>
		<title>Lensovet: audiosession-related stuff</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3843&amp;oldid=prev"/>
		<updated>2010-03-27T20:18:02Z</updated>

		<summary type="html">&lt;p&gt;audiosession-related stuff&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:18, 27 March 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot; &gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Xcode is unable to connect to your device for some reason&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Xcode is unable to connect to your device for some reason&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Sometimes Xcode will show your phone as being connected but will be unable to initialize it for development purpose for some bizarre reason. Simply restart your phone to fix the problem.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Sometimes Xcode will show your phone as being connected but will be unable to initialize it for development purpose for some bizarre reason. Simply restart your phone to fix the problem.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*GPS shuts off when user locks the screen manually or the device auto-locks&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:You can use &amp;lt;tt&amp;gt;[UIApplication sharedApplication].idleTimerDisabled = YES;&amp;lt;/tt&amp;gt; to keep the screen on, but this is bad for the screen itself and takes a nice toll on battery life. Instead, set up an &amp;lt;tt&amp;gt;AVAudioSession&amp;lt;/tt&amp;gt; with the &amp;lt;tt&amp;gt;AVAudioSessionCategoryPlayback&amp;lt;/tt&amp;gt; category, then set the &amp;lt;tt&amp;gt;kAudioSessionProperty_OverrideCategoryMixWithOthers&amp;lt;/tt&amp;gt; property (so that the user's iPod can keep playing) and a more aggressive I/O buffer using &amp;lt;tt&amp;gt;kAudioSessionProperty_PreferredHardwareIOBufferDuration&amp;lt;/tt&amp;gt;. Then, use &amp;lt;tt&amp;gt;AVAudioPlayer&amp;lt;/tt&amp;gt; to play a &amp;quot;recording&amp;quot; of total silence on endless loop for when you need to keep GPS running. &amp;lt;em&amp;gt;Note&amp;lt;/em&amp;gt;: accelerometer and WiFi still shut off when the screen is locked.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Calling &amp;lt;tt&amp;gt;[[AVAudioSession sharedInstance] setPreferredIOBufferDuration:&amp;lt;/tt&amp;gt; always errors, regardless of what value you use!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:See [http://stackoverflow.com/questions/1714507/recording-audio-on-iphone-error-with-setpreferrediobufferduration/2530737#2530737 my response on StackOverflow]. Basically this is a bug in the interface and you '''have''' to use the plain C method instead of the Objective-C one to get this to work.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3815&amp;oldid=prev</id>
		<title>Lensovet: lowercase title woot!</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3815&amp;oldid=prev"/>
		<updated>2010-01-07T21:23:40Z</updated>

		<summary type="html">&lt;p&gt;lowercase title woot!&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:23, 7 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{lowercase title}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Distinction between calling [self.property release] and self.property = nil&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Distinction between calling [self.property release] and self.property = nil&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The latter will allow you to assign the variable later and should generally be used when you want to &amp;quot;clear&amp;quot; a variable for memory saving purposes but will have a need to assign a value to it again sometime in the future. &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; will completely invalidate the object and attempting to call ''anything'' on it afterwards will result in a EXC_BAD_ACCESS error every time. What does this mean in the grand scheme of things? You will most likely use &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; in only one place in your code – the object's &amp;lt;tt&amp;gt;dealloc&amp;lt;/tt&amp;gt; method.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:The latter will allow you to assign the variable later and should generally be used when you want to &amp;quot;clear&amp;quot; a variable for memory saving purposes but will have a need to assign a value to it again sometime in the future. &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; will completely invalidate the object and attempting to call ''anything'' on it afterwards will result in a EXC_BAD_ACCESS error every time. What does this mean in the grand scheme of things? You will most likely use &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; in only one place in your code – the object's &amp;lt;tt&amp;gt;dealloc&amp;lt;/tt&amp;gt; method.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3803&amp;oldid=prev</id>
		<title>Lensovet: viewWillAppear + Xcode tips</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3803&amp;oldid=prev"/>
		<updated>2010-01-07T21:06:02Z</updated>

		<summary type="html">&lt;p&gt;viewWillAppear + Xcode tips&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 21:06, 7 January 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Watching out for deallocation and unloading of views&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Watching out for deallocation and unloading of views&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Keep in mind that if a bunch of view controllers nested one above the other, there's a bunch of unloading and deallocating happening when these views disappear (hopefully, as you should be keeping your memory usage to a minimum). In one of my view controllers, I was overfreeing controller properties because I attempted to free them inside both &amp;lt;tt&amp;gt;viewDidUnload:&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dealloc&amp;lt;/tt&amp;gt; methods. Just remember that a view should only be getting dealloc'ed after it's been unloaded, so you only need to free most things in &amp;lt;tt&amp;gt;viewDidUnload:&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:Keep in mind that if a bunch of view controllers nested one above the other, there's a bunch of unloading and deallocating happening when these views disappear (hopefully, as you should be keeping your memory usage to a minimum). In one of my view controllers, I was overfreeing controller properties because I attempted to free them inside both &amp;lt;tt&amp;gt;viewDidUnload:&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dealloc&amp;lt;/tt&amp;gt; methods. Just remember that a view should only be getting dealloc'ed after it's been unloaded, so you only need to free most things in &amp;lt;tt&amp;gt;viewDidUnload:&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Passing viewWillLoad/viewDidLoad/viewWillAppear/viewDidAppear/etc methods to child view controllers&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Say you have a view controller which manages a child view controller. The child view controller's viewWillAppear and related notification methods will *not* be called automatically by the OS for you. Your parent view controller needs to call those methods manually.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*Xcode is unable to connect to your device for some reason&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Sometimes Xcode will show your phone as being connected but will be unable to initialize it for development purpose for some bizarre reason. Simply restart your phone to fix the problem.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3801&amp;oldid=prev</id>
		<title>Lensovet: Created page with '*Distinction between calling [self.property release] and self.property = nil :The latter will allow you to assign the variable later and should generally be used when you want to…'</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=IPhone_development_tips&amp;diff=3801&amp;oldid=prev"/>
		<updated>2009-12-28T04:33:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;*Distinction between calling [self.property release] and self.property = nil :The latter will allow you to assign the variable later and should generally be used when you want to…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;*Distinction between calling [self.property release] and self.property = nil&lt;br /&gt;
:The latter will allow you to assign the variable later and should generally be used when you want to &amp;quot;clear&amp;quot; a variable for memory saving purposes but will have a need to assign a value to it again sometime in the future. &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; will completely invalidate the object and attempting to call ''anything'' on it afterwards will result in a EXC_BAD_ACCESS error every time. What does this mean in the grand scheme of things? You will most likely use &amp;lt;tt&amp;gt;release&amp;lt;/tt&amp;gt; in only one place in your code – the object's &amp;lt;tt&amp;gt;dealloc&amp;lt;/tt&amp;gt; method.&lt;br /&gt;
*Watching out for deallocation and unloading of views&lt;br /&gt;
:Keep in mind that if a bunch of view controllers nested one above the other, there's a bunch of unloading and deallocating happening when these views disappear (hopefully, as you should be keeping your memory usage to a minimum). In one of my view controllers, I was overfreeing controller properties because I attempted to free them inside both &amp;lt;tt&amp;gt;viewDidUnload:&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;dealloc&amp;lt;/tt&amp;gt; methods. Just remember that a view should only be getting dealloc'ed after it's been unloaded, so you only need to free most things in &amp;lt;tt&amp;gt;viewDidUnload:&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Lensovet</name></author>
		
	</entry>
</feed>