<?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>Th30z - Coding on the Fly &#187; iPhone</title>
	<atom:link href="http://th30z.netsons.org/category/apple/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://th30z.netsons.org</link>
	<description>Matteo Bertozzi, Objective-C, Cocoa, C, C++, Qt4, iPhone, Mac OS X, Open Moko, Matteo Bertozzi Development</description>
	<lastBuildDate>Sun, 22 Nov 2009 09:47:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>iPhone: Voice Mill</title>
		<link>http://th30z.netsons.org/2009/08/iphone-voice-mill/</link>
		<comments>http://th30z.netsons.org/2009/08/iphone-voice-mill/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 04:30:13 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Audio]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=1175</guid>
		<description><![CDATA[Yesterday I&#8217;ve played a bit with AVAudioRecorder, and this is a very small and funny example.
The main Idea is to create something like a wind mill that works with voice instead of wind.

The code below shows you how to record something. Then with the updateMeters() and peakPowerForChannel() you can extract the audio &#8220;noise&#8221;.


NSURL *url = [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I&#8217;ve played a bit with AVAudioRecorder, and this is a very small and funny example.<br />
The main Idea is to create something like a wind mill that works with voice instead of wind.</p>
<p style="text-align: center;"><object width="575" height="360" data="http://th30z.netsons.org/wp-content/uploads/VoiceMillVideo.swf" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://th30z.netsons.org/wp-content/uploads/VoiceMillVideo.swf" /><param name="allowfullscreen" value="true" /></object></p>
<p>The code below shows you how to record something. Then with the <em>updateMeters()</em> and <em>peakPowerForChannel()</em> you can extract the audio &#8220;noise&#8221;.<br />
<code></p>
<pre>
NSURL *url = [NSURL fileURLWithPath:@&quot;/dev/null&quot;];
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
    [NSNumber numberWithFloat:44100.0], AVSampleRateKey,
    [NSNumber numberWithInt:kAudioFormatAppleLossless], AVFormatIDKey,
    [NSNumber numberWithInt:1], AVNumberOfChannelsKey,
    [NSNumber numberWithInt:AVAudioQualityLow], AVEncoderAudioQualityKey,
    nil];

NSError *error;
recorder = [[AVAudioRecorder alloc] initWithURL:url
            settings:settings error:&amp;error];
if (recorder) {
    [recorder prepareToRecord];
    recorder.meteringEnabled = YES;
    [recorder record];
    ...
}
</pre>
<p></code><br />
The SWF Video is available here <a href="http://th30z.netsons.org/wp-content/uploads/VoiceMillVideo.swf">Voice Mill Video</a>.<br />
The Source Code is available here <a href="http://th30z.netsons.org/wp-content/uploads/Cocoa-VoiceMill.zip">Cocoa Voice Mill Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/08/iphone-voice-mill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone: Touch, Drag, Hit!</title>
		<link>http://th30z.netsons.org/2009/05/iphone-touch-drag-hit/</link>
		<comments>http://th30z.netsons.org/2009/05/iphone-touch-drag-hit/#comments</comments>
		<pubDate>Fri, 01 May 2009 07:46:27 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Cocoa Touch]]></category>
		<category><![CDATA[Drag & Drop]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=803</guid>
		<description><![CDATA[Yesterday, Fredrik has asked me something like &#8220;Drag &#38; Drop with Hit Test&#8221; on the iPhone. Here&#8217;s a simple example.  There&#8217;s a simple UIView class that handles the touch events and a protocol that says that if the &#8220;DragMe View&#8221; has hit or not the &#8220;HitMe View&#8221;. Below you can see the result and the [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, Fredrik has asked me something like &#8220;Drag &amp; Drop with Hit Test&#8221; on the iPhone. Here&#8217;s a simple example.  There&#8217;s a simple UIView class that handles the touch events and a protocol that says that if the &#8220;DragMe View&#8221; has hit or not the &#8220;HitMe View&#8221;. Below you can see the result and the Source Code Link.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/iphonetouchdraghit.png"><img class="aligncenter size-medium wp-image-807" title="iPhone Touch Drag Hit" src="http://th30z.netsons.org/wp-content/uploads/iphonetouchdraghit-350x325.png" alt="iPhone Touch Drag Hit" width="350" height="325" /></a></p>
<p>The source code is available here: <a title="iPhone Touch Drag Hit Source Code" href="http://th30z.netsons.org/wp-content/uploads/iphone-touchdraghit.zip">Touch, Drag, Hit Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/05/iphone-touch-drag-hit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iPhone: Download and Display Gravatar</title>
		<link>http://th30z.netsons.org/2009/03/iphone-download-and-display-gravatar/</link>
		<comments>http://th30z.netsons.org/2009/03/iphone-download-and-display-gravatar/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 10:27:41 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=662</guid>
		<description><![CDATA[Back to the real iPhone for a while&#8230; Gravatar, or globally recognized avatar, is an interesting free service. It can be integrated with AddressBook app or other apps that can have a picture related to email address. Here an Objective-C Example to retrive the Gravatar. It&#8217;s really simple!
The Source Code is Available Here: iPhone Gravatar [...]]]></description>
			<content:encoded><![CDATA[<p>Back to the real iPhone for a while&#8230; <a title="Gravatar" href="http://www.gravatar.com/">Gravatar</a>, or <strong>g</strong>lobally <strong>r</strong>ecognized <strong>avatar</strong>, is an interesting free service. It can be integrated with AddressBook app or other apps that can have a picture related to email address. Here an Objective-C Example to retrive the Gravatar. <em>It&#8217;s really simple!</em></p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/iphonegravatar.png"><img class="aligncenter size-medium wp-image-666" title="iPhone Gravatar" src="http://th30z.netsons.org/wp-content/uploads/iphonegravatar-350x188.png" alt="iPhone Gravatar" width="350" height="188" /></a>The Source Code is Available Here: <a href="http://th30z.netsons.org/wp-content/uploads/iphonegravatar.zip">iPhone Gravatar Example</a>.<em></em></p>
<p><em>The Apple Worldwide Developers Conference (WWDC) takes place June 8-12, 2009 held at Moscone Center West in San Francisco. <a title="Apple WWDC" href="http://developer.apple.com/WWDC/">http://developer.apple.com/WWDC/</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/03/iphone-download-and-display-gravatar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C: SQLite Wrapper</title>
		<link>http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/</link>
		<comments>http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 06:41:15 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=317</guid>
		<description><![CDATA[I&#8217;ve written a simple SQLite Wrapper with two Examples one for Mac and one for the iPhone. The Wrapper class has the same source code for both platforms.
Here you can find the Mac Example Source Code and the iPhone Example Source Code.

This is a simple usage example:

Sqlite *sqlite = [[Sqlite alloc] init];

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a simple SQLite Wrapper with two Examples one for Mac and one for the iPhone. <em>The Wrapper class has the same source code for both platforms</em>.</p>
<p>Here you can find the <a href="http://th30z.netsons.org/wp-content/uploads/mac-testsqlite.zip">Mac Example Source Code</a> and the <a href="http://th30z.netsons.org/wp-content/uploads/iphone-testsqlite.zip">iPhone Example Source Code</a>.</p>
<div><a href="http://th30z.netsons.org/wp-content/uploads/iphonesqlitetest.png"><img src="http://th30z.netsons.org/wp-content/uploads/iphonesqlitetest-188x350.png" alt="iPhone Test SQLite App" title="iPhone Test SQLite App" width="188" height="350" class="aligncenter size-medium wp-image-318" /></a></div>
<p>This is a simple usage example:</p>
<pre>
Sqlite *sqlite = [[Sqlite alloc] init];

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                             NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *writableDBPath = [documentsDirectory
                        stringByAppendingPathComponent:@"SQLiteTest.db"];
if (![sqlite open:writableDBPath])
  return;

[sqlite executeNonQuery:@"CREATE TABLE test (key TEXT NOT NULL, value TEXT);"];
[sqlite executeNonQuery:@"DELETE FROM test;"];
[sqlite executeNonQuery:@"INSERT INTO test VALUES (?, ?);",
                        [Sqlite createUuid], @"PROVA"];
[sqlite executeNonQuery:@"INSERT INTO test VALUES (?, ?);",
                         [Sqlite createUuid], @"PROVA 2"];
[sqlite executeNonQuery:@"INSERT INTO test VALUES (?, ?);",
                         [Sqlite createUuid], @"PROVA 3"];

NSArray *results = [sqlite executeQuery:@"SELECT * FROM test;"];
for (NSDictionary *dictionary in results) {
  NSLog(@"Row");
  for (NSString *key in [dictionary keyEnumerator])
      NSLog(@" - %@ %@", key, [dictionary objectForKey:key]);
}

[results release];
[sqlite release];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/11/objective-c-sqlite-wrapper/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>&#8220;Hello World&#8221; iPhone</title>
		<link>http://th30z.netsons.org/2008/07/hello-world-iphone/</link>
		<comments>http://th30z.netsons.org/2008/07/hello-world-iphone/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 05:18:27 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[XCode]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=16</guid>
		<description><![CDATA[Four easy steps to make iPhone Hello World.
]]></description>
			<content:encoded><![CDATA[<p>Four easy steps to make iPhone Hello World.</p>

<a href='http://th30z.netsons.org/2008/07/hello-world-iphone/xcode-step13/' title='XCode New Project'><img width="150" height="150" src="http://th30z.netsons.org/wp-content/uploads/xcode-step13-150x150.jpg" class="attachment-thumbnail" alt="XCode New Project" title="XCode New Project" /></a>
<a href='http://th30z.netsons.org/2008/07/hello-world-iphone/xcode-step22/' title='XCode Cocoa Touch Project'><img width="150" height="150" src="http://th30z.netsons.org/wp-content/uploads/xcode-step22-150x150.jpg" class="attachment-thumbnail" alt="XCode Cocoa Touch Project" title="XCode Cocoa Touch Project" /></a>
<a href='http://th30z.netsons.org/2008/07/hello-world-iphone/xcode-step32/' title='Write the Hello Code'><img width="150" height="150" src="http://th30z.netsons.org/wp-content/uploads/xcode-step32-150x150.jpg" class="attachment-thumbnail" alt="Write the Hello Code" title="Write the Hello Code" /></a>
<a href='http://th30z.netsons.org/2008/07/hello-world-iphone/xcode-step42/' title='iPhone Simulator'><img width="150" height="150" src="http://th30z.netsons.org/wp-content/uploads/xcode-step42-150x150.jpg" class="attachment-thumbnail" alt="iPhone Simulator" title="iPhone Simulator" /></a>

]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/07/hello-world-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
