<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>iphone swing</title>
	<atom:link href="http://iphoneinsandouts.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://iphoneinsandouts.wordpress.com</link>
	<description>iphone programming and design</description>
	<lastBuildDate>Thu, 15 Dec 2011 09:36:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='iphoneinsandouts.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>iphone swing</title>
		<link>http://iphoneinsandouts.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://iphoneinsandouts.wordpress.com/osd.xml" title="iphone swing" />
	<atom:link rel='hub' href='http://iphoneinsandouts.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2011 Class 4/5: shaking</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/12/14/2011-class-45-shaking/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/12/14/2011-class-45-shaking/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 20:06:16 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone design]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=341</guid>
		<description><![CDATA[We use the tilt sensors of the iphone/ipad for this third assignment. This template is for the iphone in principle. It can be used for Ipad too. http://www.contrechoc.com/crosslab/Shaking.zip The tiltsensor is used to make a circle move, if the circle bounces against the left, right, bottom, top &#8211; side, another page is loaded and after [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=341&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We use the tilt sensors of the iphone/ipad for this third assignment.</p>
<p>This template is for the iphone in principle. It can be used for Ipad too.</p>
<p><a href="http://www.contrechoc.com/crosslab/Shaking.zip">http://www.contrechoc.com/crosslab/Shaking.zip</a></p>
<p>The tiltsensor is used to make a circle move, if the circle bounces against the left, right, bottom, top &#8211; side, another page is loaded and after a few seconds removed.<br />
With these ingredients, the &#8220;wrist exercise&#8221; and the 5 images, make an app.<br />
Start with concepting, than making images, and sounds.</p>
<p>The pages shown are the XIB&#8217;s, with &#8220;portrait&#8221;.</p>
<p><img src="http://www.contrechoc.com/crosslab/shake1.jpg" alt="screenshot simulator" /><br />
The buttons can be used for the simulator, in the real test on a device these buttons can be removed.</p>
<p><img style="position:absolute;visibility:visible;color:transparent;z-index:2147483647;left:300px;top:57px;margin:0;" src="image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAUCAYAAACJfM0wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDQvMDQvMDhrK9wWAAACLklEQVQ4jbXUP0wTcRQH8O/9ekdjkT8CUqpee00bRyNNmSRSV0PcJJoQg2i6ODTExEUHg04OaNSppqtCjQ4ukDSKSuLUwcm4NNZcQYsIGtD+u/f7MZSWXltqo/Ul7/JL7u7z3r3fLye53e5xj8ejoYWRSCSSstfr1YLBYHcr4XA4rMmMMciy3EoXjDHIjDEoivL/4fefrP1P3nYEvqzLajOIo8fQz5/cfH3cnVttCM8udQaODBxQFx44Ye9h4HxvdGWtgMlbSXV2SQoMHf0RNcGSJJlmvPLdos7fdyIWL+D5myx+ZwwUDAIRh2EU1wYRFItA6FwvIjdcGJr4qFYakiSBlTavlABwsJth7mUWmSyBOAfnAkQE4gKccxBx/MoYmHmcxuH+NgAwGQ03j3NeRjjnoGqcC/zcIgghAMBkNISJuKlbEy4EaKdoKerC5nNMxQdlgVx+t0siKhYQovwV1rbdtyoNxlhxxoqilBMA0uuES6Pt6NqP2hHsoDarhJuXD2F5NV/uuJR1T4XLzvTJ25/VyHUnzgzba0YkKq6pdB4T00m47EyvPhU1M54asy3ee5o55bvwQQWAr/PHMBfbQGhGrykCANqARZ8asy3+ccYjg/K3kcF9UQAYvrJ29dmrDUxHlnOxu72P+rpYrq5eFU39K649TCF0tnPB0WdtCt2z48rQHIp+8XTHu9ET7alm0aY6fnFHjda98a/w3wZjDJLP5xv3+/1aK+F4PJ7cBm32CUNiyI2GAAAAAElFTkSuQmCC" alt="" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=341&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/12/14/2011-class-45-shaking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>

		<media:content url="http://www.contrechoc.com/crosslab/shake1.jpg" medium="image">
			<media:title type="html">screenshot simulator</media:title>
		</media:content>
	</item>
		<item>
		<title>2011 Class 2/3 Story telling with gestures</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/11/28/2011-class-23-story-telling-with-gestures/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/11/28/2011-class-23-story-telling-with-gestures/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 12:08:27 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone design]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=332</guid>
		<description><![CDATA[http://www.contrechoc.com/crosslab/Touches.zip is the first download for these two lessons. This App recognizes the gestures, touch, pinch, rotate. Some images on the screen can be replaced and scaled and rotated. The assignment is to make a &#8220;imaginary world&#8221; of this App (replacing the images) and make a story. (interactive Storytelling) So starting interactive storytelling, you need: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=332&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.contrechoc.com/crosslab/Touches.zip">http://www.contrechoc.com/crosslab/Touches.zip</a></p>
<p>is the first download for these two lessons.</p>
<p>This App recognizes the gestures, touch, pinch, rotate.</p>
<p>Some images on the screen can be replaced and scaled and rotated. The assignment is to make a &#8220;imaginary world&#8221; of this App (replacing the images) and make a story. (interactive Storytelling)</p>
<p>So starting interactive storytelling, you need:</p>
<ul>
<li>to play a bit with the app to see its possibilities</li>
<li>try out to change the images, background, add images to app,  experiment, (images of text?)</li>
<li>come up with an idea to make a story with the possibilities provided, scenario</li>
<li>translate your story for the app possibilities and make  images for it, insert the images into the app</li>
<li>test if your idea works, come up with solutions if not (these solutions might be the best ideas!)</li>
<li>prepare a performance for your story, make a movie of the performance, upload to youtube</li>
</ul>
<p>In the second week we will be able to add sounds too, so leave that option open for the moment.</p>
<p>By the way, here you can find example apps, with code: <a href="http://appsamuck.com/">http://appsamuck.com/</a></p>
<p>Second week:<br />
added are sounds!<br />
and you can get a &#8220;tap&#8221; image when a shape is tapped:</p>
<p><a href="http://www.contrechoc.com/crosslab/GesturesWithSounds.zip">http://www.contrechoc.com/crosslab/GesturesWithSounds.zip</a></p>
<p>you have to dig into the code to find the sounds to replace, and the tap images to replace.<br />
adding other shapes is copy pasting of the right lines of code!</p>
<p>making the .caf sounds is like this:<br />
// in terminal windows on MAC<br />
// beam&#8217;s-macbook: contrechoc$ afconvert -f caff -d ima4 trill.wav</p>
<p>also if not just replacing, but really adding sounds, you have to add codelines in the ShortSound.m file.</p>
<p>This download has an example with an animated image:</p>
<p><a href="http://www.contrechoc.com/crosslab/GesturesWithSounds2.zip">http://www.contrechoc.com/crosslab/GesturesWithSounds2.zip</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=332&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/11/28/2011-class-23-story-telling-with-gestures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>
	</item>
		<item>
		<title>2011 Class 1/2</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/11/16/2011-class-12/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/11/16/2011-class-12/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 19:27:59 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone design]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=316</guid>
		<description><![CDATA[Here are the starters of the first lesson: http://www.contrechoc.com/crosslab/mobile_design.ppt.zip http://www.contrechoc.com/crosslab/mobile_design2.ppt.zip First study how newspapers are translated to an Ipad format. Then discover the rotation, portrait landscape versions. Our first exercise will be to explore the possibilities of newspaper apps and make our own version using this template for Xcode: Template for use with NIB (interfacebuilder) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=316&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are the starters of the first lesson:<br />
<a href="http://www.contrechoc.com/crosslab/mobile_design.ppt.zip">http://www.contrechoc.com/crosslab/mobile_design.ppt.zip</a></p>
<p><a href="http://www.contrechoc.com/crosslab/mobile_design2.ppt.zip">http://www.contrechoc.com/crosslab/mobile_design2.ppt.zip</a></p>
<p>First study how newspapers are translated to an Ipad format. Then discover the rotation, portrait landscape versions.</p>
<p>Our first exercise will be to explore the possibilities of newspaper apps and make our own version using this template for Xcode:</p>
<p>Template for use with NIB (interfacebuilder)<br />
<a href="http://www.contrechoc.com/crosslab/AlternateViews.zip">http://www.contrechoc.com/crosslab/AlternateViews.zip</a></p>
<p>Template for use with images in code (and an extra image on touch)<br />
<a href="http://www.contrechoc.com/crosslab/AlternateViews2.zip">http://www.contrechoc.com/crosslab/AlternateViews2.zip</a> (without battery and viewcontroller bar)</p>
<p>We discover Xcode and have a first go at this daunting program!</p>
<p>We need a few icons:<br />
Launch image (required for all apps)<br />
Iphone:<br />
320 x 480<br />
640 x 960 (high resolution)<br />
Ipad:<br />
For portrait: 768 x 1004<br />
For landscape: 1024 x 748</p>
<p>Application icon (required for all apps)<br />
Iphone:<br />
57 x 57<br />
114 x 114 (high resolution)<br />
Ipad:<br />
72 x 72</p>
<p><img class="aligncenter" title="paper" src="http://www.contrechoc.com/crosslab/paper2.jpg" alt="" width="400" /></p>
<p><img class="aligncenter" title="paper" src="http://www.contrechoc.com/crosslab/paper1.jpg" alt="" width="300" /></p>
<p>This is a link to the User Design Guide:<br />
<a href="http://developer.apple.com/library/safari/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html">http://developer.apple.com/library/safari/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html</a></p>
<p>There were problems using the Interfacebuilder, text shifts and images too&#8230;<br />
Getting the basic Portrait and Landscape Views right in size helped (a bit), not always!</p>
<p><img class="aligncenter" title="paper" src="http://www.contrechoc.com/crosslab/resize.jpg" alt="" width="400" /></p>
<p>After  making the rotating newspapers we will add some Ipad magic!</p>
<p>(The last movie of the presentation, Ipad magic gives us our first &#8216;art&#8217; &#8211; app idea.)</p>
<p>The idea is to make a transparent Ipad, using an image from for instance your head, putting the image inside the Ipad app, and making a photo in with the Ipad in front of your head&#8230;.other ideas are possible!</p>
<p><a href="http://www.youtube.com/watch?v=cbI0r0CIT18&amp;feature=related"><img class="aligncenter" title="paper" src="http://www.contrechoc.com/crosslab/transparent.jpg" alt="" width="400" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=316&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/11/16/2011-class-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>

		<media:content url="http://www.contrechoc.com/crosslab/paper2.jpg" medium="image">
			<media:title type="html">paper</media:title>
		</media:content>

		<media:content url="http://www.contrechoc.com/crosslab/paper1.jpg" medium="image">
			<media:title type="html">paper</media:title>
		</media:content>

		<media:content url="http://www.contrechoc.com/crosslab/resize.jpg" medium="image">
			<media:title type="html">paper</media:title>
		</media:content>

		<media:content url="http://www.contrechoc.com/crosslab/transparent.jpg" medium="image">
			<media:title type="html">paper</media:title>
		</media:content>
	</item>
		<item>
		<title>AR iphone template</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/04/28/ar-iphone-template/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/04/28/ar-iphone-template/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 11:49:15 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=308</guid>
		<description><![CDATA[We found a working AR iphone code, using ARToolKitPlus here: http://www.benjaminloulier.com of Benjamin Loulier &#8211; it works! It is free! But how to use it for your own projects? The tag images can be found in the project folder, there are two kinds of images, tags with a thin border and tags with a big [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=308&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We found a working AR iphone code, using ARToolKitPlus here:<br />
<a href="http://www.benjaminloulier.com">http://www.benjaminloulier.com</a><br />
of Benjamin Loulier &#8211; it works! It is free!</p>
<p>But how to use it for your own projects?</p>
<p>The tag images can be found in the project folder, there are two kinds of images, tags with a thin border and tags with a big border. The tags with a big border are used in this code.</p>
<p>After mending &#8220;an Xcode issue&#8221;: in ARToolKitPlusWrapper.mm<br />
<em><code><br />
/*!<br />
Private interface for ARToolKitPlusWrapper<br />
*/<br />
@interface ARToolKitPlusWrapper ()<br />
/*!<br />
The Object from ARToolKitPlus library responsible for detecting markers<br />
*/<br />
//ARToolKitPlus::TrackerSingleMarker *tracker;// -----------&gt;commented out here<br />
@end</code></em><br />
<code><br />
<em> @implementation ARToolKitPlusWrapper</em><br />
<em> ARToolKitPlus::TrackerSingleMarker *tracker; // ---------------------&gt;added here</em><br />
</code></p>
<p>But then how to get our own shapes and images in?<br />
Where is this documented? Anyway we found this out:</p>
<p>make a shape in BLENDER, (you have to know something about BLENDER)<br />
add a UV image (after Unwrap etc)<br />
export as an yourFileName.obj file (mind that the shape has to be selected, and use the UV button in the export menu)</p>
<p>This yourFileName.obj file can be converted using obj2opengl.pl which you can find in the folder &#8220;tools&#8221;, using terminal window, drag in obj2opengl.pl, drag the yourFileName.obj file behind it and press return.</p>
<p>A new file is generated and has to be dragged in the Xcode project, is a yourFileName.h format file (a header file)</p>
<p>In the code:</p>
<p>add a yourFileName.xml file, look at the other what to do, don&#8217;t add something in</p>
<p><code><br />
&lt;ModelFileName&gt;&lt;/ModelFileName&gt;<br />
</code></p>
<p>also drag the picture to be uv-ed on the shape into the project.</p>
<p>add<br />
<code><br />
#import "yourFileName.h"<br />
</code><br />
in Object3D.m</p>
<p>and add:<br />
<code><br />
<em>else if ([self.name isEqualToString:@"yourFileName"]) {</em><br />
<em> self.numberOfVertices = yourFileNameNumVerts;</em><br />
<em> self.vertices = yourFileNameVerts;</em><br />
<em> self.normals = yourFileNameNormals;</em><br />
<em> self.textureCoordinates = yourFileNameTexCoords;</em><br />
<em> }</em><br />
</code><br />
into Object3D.m, look for the banana to find the appropriate spot!</p>
<p>Also in the 3D Model code group folder, there is an infolist, where you have to add your model, the XML of the model and the tag image number to link your model on.</p>
<p>In the end, the image has to be 512 x 512 pixels, otherwise it won&#8217;t show.</p>
<p>have fun, here is the download with our simple BLENDER experiments:<br />
<a href="http://www.contrechoc.com/crosslab/omeryavuz-VRToolKit-experiments.zip">http://www.contrechoc.com/crosslab/omeryavuz-VRToolKit-experiments.zip</a></p>
<p>Somehow the speed of the AR animation is not too big, is this because of the generated comments? Can it be made to react faster or is this the limit of the Iphone&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/308/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=308&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/04/28/ar-iphone-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile Design 7, modifying a template</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/03/21/mobile-design-7-modifying-a-template/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/03/21/mobile-design-7-modifying-a-template/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 13:52:12 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=303</guid>
		<description><![CDATA[We practiced with the tilt &#8211; template. Some students noticed the fact that the moving object was not exactly centered. Wessel found the solution. Also the buttons were not corresponding in action with the actual tilt, when the template was played on a device. So here are the corrections in code: imageOnBackGround.frame = CGRectMake(self.view.bounds.size.width/2 + [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=303&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We practiced with the tilt &#8211; template.</p>
<p>Some students noticed the fact that the moving object was not exactly centered. Wessel found the solution. Also the buttons were not corresponding in action with the actual tilt, when the template was played on a device.</p>
<p>So here are the corrections in code:<br />
<strong><code> imageOnBackGround.frame = CGRectMake(self.view.bounds.size.width/2 + 150*accelerationX -45 ,<br />
self.view.bounds.size.height/2 -200*accelerationY  -65,<br />
imageOnBackGround.bounds.size.width,<br />
imageOnBackGround.bounds.size.height );</code></strong>//&lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>//NSLog(@&#8221;tilt %f %f&#8221;,accelerationX,accelerationY);//-1.75 +1.75, -1.75 +1.75</p>
<p>ShakingAppDelegate *appDelegate = (ShakingAppDelegate*)[[UIApplication sharedApplication] delegate];</p>
<p>if ( (1 == 1) &amp;&amp; (bounceDelayFlag == FALSE) ){<br />
if (accelerationX &gt; 1.00 )<br />
{</p>
<p>[appDelegate.soundEngine playSound : @"nr1" ] ;<br />
myHeighHit++;</p>
<p>delayTimer = [NSTimer scheduledTimerWithTimeInterval: 1.0 target:self selector:@selector(onTimerDelay) userInfo:nil repeats:NO];<br />
bounceDelayFlag = TRUE;<br />
NSLog(@&#8221;right&#8221; );<br />
[self.view addSubview:fourthViewController.view ];//&lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
[fourthViewController startAnimatedImage];</p>
<p>}<br />
else if (accelerationX &lt;-1.00 )     {                       [appDelegate.soundEngine playSound : @"nr2" ];             myLowHit++;               delayTimer = [NSTimer scheduledTimerWithTimeInterval: 1.0 target:self selector:@selector(onTimerDelay) userInfo:nil repeats:NO];             bounceDelayFlag = TRUE;             NSLog(@&#8221;left&#8221; );</p>
<p>[self.view addSubview:thirdViewController.view ]; //&lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>[thirdViewController startAnimatedImage];               }               else if (accelerationY &gt; 1.00 )<br />
{<br />
if ( bounceDelayFlag == FALSE  ){<br />
[appDelegate.soundEngine playSound : @"nr3" ];<br />
myLowHit++;</p>
<p>[NSTimer scheduledTimerWithTimeInterval: 1.0 target:self selector:@selector(onTimerDelay) userInfo:nil repeats:NO];<br />
bounceDelayFlag = TRUE;<br />
NSLog(@&#8221;up&#8221; );<br />
[self.view addSubview:firstViewController.view ];//&lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
[firstViewController startAnimatedImage];<br />
}<br />
}<br />
else if (accelerationY &lt; -1.00 )<br />
{<br />
if ( bounceDelayFlag == FALSE  ){<br />
[appDelegate.soundEngine playSound : @"nr4" ];<br />
myLowHit++;</p>
<p>[NSTimer scheduledTimerWithTimeInterval: 1.0 target:self selector:@selector(onTimerDelay) userInfo:nil repeats:NO];<br />
bounceDelayFlag = TRUE;<br />
NSLog(@&#8221;down&#8221; );<br />
[self.view addSubview:secondViewController.view ];//&lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
[secondViewController startAnimatedImage];<br />
}</p>
<p>}</p>
<p>}</p>
<p>The //&lt;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; indicator shows the corrected lines of code.</p>
<p>This correction is incorporated in the templates.</p>
<p><a href="http://www.contrechoc.com/crosslab/templates3.zip">http://www.contrechoc.com/crosslab/templates3.zip</a></p>
<p>Thx Wessel!</p>
<p>Mind the number of closing curly brackets at the end, these have to match the opening curly brackets.</p>
<p>We used Xcode 4.0 for the first time, quite a difference!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/303/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=303&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/03/21/mobile-design-7-modifying-a-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile Design 5 (Gestures)</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/03/15/mobile-design-5/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/03/15/mobile-design-5/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 11:43:11 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>
		<category><![CDATA[iphone concepts]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=292</guid>
		<description><![CDATA[In this lesson we look at touch, multitouch and gestures. All of this is based on touch: witch three standard functions in the ViewCOntroller.m - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if ( [[event allTouches] count] &#62;= 1 ) { } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { } [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=292&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this lesson we look at touch, multitouch and gestures.</p>
<p>All of this is based on touch: witch three standard functions in the ViewCOntroller.m<br />
<code><br />
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {<br />
if ( [[event allTouches] count] &gt;= 1 )<br />
{<br />
}<br />
}<br />
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {<br />
}<br />
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {<br />
}<br />
</code></p>
<p>In the touchesBegan you can store the starting touchpoint and count the multitouch points.<br />
You can count the touching points in the touchbegan and let that decide what to do.</p>
<p>When touchesEnded occurs you can compare the starting point with the end point and conclude if this was a swipe and which was the direction.</p>
<p>This information is then used to change views, get the next page or the last page etc.</p>
<p>A template to play with can be found here:<br />
<a href="http://www.contrechoc.com/crosslab/template5.zip">template5.zip</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/292/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=292&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/03/15/mobile-design-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile Design 6 (transistions)</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/03/15/mobile-design-6-transistions/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/03/15/mobile-design-6-transistions/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 11:42:19 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>
		<category><![CDATA[iphone concepts]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=297</guid>
		<description><![CDATA[In an app, you have to go from one page to the other quit frequently. The pages are called views, and the changing is called a transition. There are standard animations for going from one view to the other, flipping is fun, but also the curling. This curling is like a piece of paper curling [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=297&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In an app, you have to go from one page to the other quit frequently.  The pages are called views, and the changing is called a transition.<br />
There are standard animations for going from one view to the other, flipping is fun, but also the curling. This curling is like a piece of paper curling up. This curling is very much the preferred Apple metaphor for app development, using the things we know in reality, like the page in a book.</p>
<p>You can manage these transitions in the template app yourself:<br />
In BaseUIViewController.m,</p>
<p>you can find:</p>
<p><code> -(void)loadNextView: (UIViewController *)nextViewController : (UIViewController *)oldViewController{ </code></p>
<p><code>NSLog(@"transition");<br />
[UIView transitionWithView:self.view duration:5.0 </code></p>
<p><code>options:UIViewAnimationOptionTransitionCurlUp animations:^{</code></p>
<p><code><br />
[oldViewController.view removeFromSuperview];<br />
[self.view addSubview:nextViewController.view];<br />
} 					completion:NULL];</code></p>
<p><code><br />
/* 	UIViewAnimationOptionTransitionNone             	UIViewAnimationOptionTransitionFlipFromLeft      	UIViewAnimationOptionTransitionFlipFromRight    	UIViewAnimationOptionTransitionCurlUp           	UIViewAnimationOptionTransitionCurlDown 	*/</code></p>
<p><code><br />
} </code><br />
Between the /* and */ are the so called constants for the transition. Between the /* and */ these are comments and not compiled. The</p>
<p><code> options:UIViewAnimationOptionTransitionCurlUp animations:^{ </code></p>
<p>codeline is where the current transition is called. Just replace the  UIViewAnimationOptionTransitionCurlUp<br />
with one of the other transition contents and you&#8217;ll see the other effects.  Also you can mange the speed quite easily:<br />
<code>[UIView transitionWithView:self.view duration:5.0</code></p>
<p>change the duration (in seconds, here 5.0) and it becomes faster or slower.</p>
<p>In the template (imagery will be improved) you can also change from ipad view to iphone view in the simulator quite easily by changing this in the project properties. Just indicate iphone or ipad in the line: Targeted Device family</p>
<p>This is so easy because all the views are coded, and there is no design in the NIB&#8217;s.</p>
<p>A template to play with can be found here:<br />
<a href="http://www.contrechoc.com/crosslab/template5.zip">template5.zip</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/297/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/297/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/297/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=297&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/03/15/mobile-design-6-transistions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile Design 4 Sound</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/03/07/mobile-design-4-sound/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/03/07/mobile-design-4-sound/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 11:22:48 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=286</guid>
		<description><![CDATA[adding sound, a to do list&#8230;. (sorry this is fairly complex) in projectview: frameworks -&#62; add existing framework audiotools copy from another template from this blogs (template4, project Sounds2) the folder sound from this project into your own project in your own project search for the &#8230;AppDelegate.h into the list of files, add the following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=286&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>adding sound, a to do list&#8230;.<br />
(sorry this is fairly complex)</p>
<p>in projectview: frameworks -&gt; add existing framework audiotools</p>
<p>copy from another template from this blogs (<a href="http://www.contrechoc.com/crosslab/template4.zip">template4</a>, project Sounds2) the folder sound from this project into your own project</p>
<p>in your own project search for the &#8230;AppDelegate.h into the list of files, add the following sentences on the corresponding places:</p>
<p><code><br />
#import &lt;UIKit/UIKit.h&gt;<br />
@class SoundButton2ViewController;<br />
<strong>//this line under import and or class:<br />
#import "ShortSound.h"</strong><br />
@interface PagingScrollViewAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {<br />
UIWindow *window;<br />
SoundButton2ViewController *viewController;<br />
<strong>//this line:<br />
ShortSound* soundEngine;</strong><br />
}<br />
<strong>//this line:<br />
@property (nonatomic, retain) ShortSound* soundEngine;</strong><br />
@property (nonatomic, retain) IBOutlet UIWindow *window;<br />
@property (nonatomic, retain) IBOutlet SoundButton2ViewController *viewController;<br />
@end<br />
</code><br />
then in the corresponding  AppDelegate.m<br />
under the line:<br />
<code><br />
@implementation ….AppDelegate<br />
<strong>//add this line:<br />
@synthesize soundEngine;</strong><br />
</code></p>
<p>then where you want the sound:</p>
<p>in the headerfile (.h) add:<br />
<code><br />
#import "PagingScrollViewAppDelegate.h"<br />
</code><br />
in the sourcefile (.m)<br />
create a variable: referring to the AppDelegate mentioned above:</p>
<p><code><br />
PagingScrollViewAppDelegate *appDelegate = (PagingScrollViewAppDelegate*)[[UIApplication sharedApplication] delegate];<br />
[appDelegate.soundEngine playSound : @"sis" ]; //this line actually plays the sound<br />
</code><br />
and finally the last line plays the sis.cav file.</p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/02/sound-play-command.jpg"><img title="sound play command" src="http://iphoneinsandouts.files.wordpress.com/2011/02/sound-play-command.jpg?w=300&#038;h=13" alt="" width="300" height="13" /></a></p>
<p>This sis.cav file , for testing , can be copied from the sound template.</p>
<p>How to get a .cav file is explained in Mobile Design 3. (Using terminal window and afconverter)</p>
<p>To change the sounds, make new sounds, drag these sounds in the project, and change the names of the soundfiles in the ShortSound.m file:</p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/03/sound_file_names.jpg"><img class="size-medium wp-image-287 aligncenter" title="sound_file_names" src="http://iphoneinsandouts.files.wordpress.com/2011/03/sound_file_names.jpg?w=571&#038;h=244" alt="" width="571" height="244" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/286/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=286&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/03/07/mobile-design-4-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/02/sound-play-command.jpg?w=300" medium="image">
			<media:title type="html">sound play command</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/03/sound_file_names.jpg?w=300" medium="image">
			<media:title type="html">sound_file_names</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile design 4</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/02/22/mobile-design-4/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/02/22/mobile-design-4/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 16:41:20 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=265</guid>
		<description><![CDATA[This evening we will look at coding. Not real coding! This cannot be learned in 3 houres. Not even in three weeks. Xcode is fairly complex, even for programmers. We will learn looking into code and search spots where we can hack and modify. In this image you see the template we will hack and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=265&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This evening we will look at coding. Not real coding! This cannot be learned in 3 houres. Not even in three weeks. Xcode is fairly complex, even for programmers.</p>
<p>We will learn looking into code and search spots where we can hack and modify.</p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/02/prog.jpg"><img class="size-medium wp-image-266 aligncenter" title="prog" src="http://iphoneinsandouts.files.wordpress.com/2011/02/prog.jpg?w=284&#038;h=300" alt="" width="284" height="300" /></a></p>
<p>In this image you see the template we will hack and modify. We will not change anything in the coding but the image names. The backgorund is yellow, we can change the background color in:</p>
<p>BasePageViewController.m</p>
<p>where we see in loadView the line of code:</p>
<p>baseView.backgroundColor =  [UIColor colorWithRed:255.0 green:255.0 blue:0.0 alpha:1];</p>
<p>change the RGB values and see what happens.</p>
<p>IMAGE</p>
<p>in the same file we see:</p>
<p>UIImageView* imageOnBackGround  =  [[UIImageView alloc] initWithImage: [UIImage imageNamed:@"crosslab.png"]];</p>
<p>and we can change the image, just by changing the crosslab.png, the image file name , don&#8217;t forget to import the new image in the project by dragging it in the window.</p>
<p>We continue with the file:</p>
<p>PagingScrollViewController.m</p>
<p>In the function -(void)addLogo</p>
<p>we see lots of images and texts, all in red in the Xcode window. This red text can be changed!</p>
<p>The names of the scrolling images are hidden elsewhere, we find them in DataSource.m.</p>
<p>This file is a list of images and subtitles, these can be changed in other image names, and subtitles.</p>
<p>Working like this we get a glimpse of the code and how we can fool around trying to modify an existing template.</p>
<p><strong>SOUND</strong></p>
<p>(Making a new template, see soundButton2, i realized again this was more difficult than expected. So play around with this template changing the sounds, and don&#8217;t bother to make this yourself&#8230;.)</p>
<p>Adding sound.</p>
<p>See blog <a href="http://iphoneinsandouts.wordpress.com/2011/03/07/mobile-design-4-sound/">Mobile Design 4</a> Sounds for the coding.</p>
<p>The sounds are not mp3 or wav. Sounds have to be in the format of Xcode:</p>
<p>You get the right sound files formats using the terminal window:</p>
<p>the command is: afconvert -f caff -d ima4 soundName.wav and the file will be converted.<br />
// in terminal windows on MAC<br />
// my-macbook: contrechoc$ afconvert -f caff -d ima4 trill.wav</p>
<p>The templates we use in this lesson can be found here:</p>
<p><a title="http://www.contrechoc.com/crosslab/template4.zip">http://www.contrechoc.com/crosslab/template4.zip</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/265/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/265/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/265/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=265&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/02/22/mobile-design-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/02/prog.jpg?w=284" medium="image">
			<media:title type="html">prog</media:title>
		</media:content>
	</item>
		<item>
		<title>Mobile design 3</title>
		<link>http://iphoneinsandouts.wordpress.com/2011/02/21/mobile-design-3/</link>
		<comments>http://iphoneinsandouts.wordpress.com/2011/02/21/mobile-design-3/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 07:45:07 +0000</pubDate>
		<dc:creator>contrechoc</dc:creator>
				<category><![CDATA[iphone coding]]></category>
		<category><![CDATA[iphone design]]></category>

		<guid isPermaLink="false">http://iphoneinsandouts.wordpress.com/?p=256</guid>
		<description><![CDATA[This time we will practice with the real tilt sensor. We see this action only on the devices, not in the simulator, therefor we need to upload our rapid prototyped apps to the iphones and ipads. The template has an object in the middle of the screen, which moves when you tilt the device. When [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=256&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This time we will practice with the real tilt sensor.</p>
<p>We see this action only on the devices, not in the simulator, therefor we need to upload our rapid prototyped apps to the iphones and ipads.</p>
<p>The template has an object in the middle of the screen, which moves when you tilt the device. When it hits a side a &#8220;view&#8221; is loaded. This view can be opaque, or transparent (showing only pictures or text without the page).</p>
<p>Opaque view can be indicated in the interfacebuilder (or coded).</p>
<p>For this example four views are programmed, which are only shown by hitting a boundary, and removed after a few seconds. So we have one background, one object and four views to play with, and the action of tilting.</p>
<p>To create more dramatics, i have added sounds too. More on these sounds later on in the course. The sounds cannot be added in the interfacebuilder but must be triggered by code. This is just a copy and paste action of the codes for sounds&#8230;.</p>
<p>To work with the template provided below in the simulator, I have added some buttons to the interface for testing.</p>
<p>The assignment is to practice with this template on the device. To make a short interactive story. This story can be made up of whole pages, or part of pages (using the transparent pages).</p>
<p>This template can be used:</p>
<p><a href="http://www.contrechoc.com/crosslab/templates3.zip">http://www.contrechoc.com/crosslab/templates3.zip</a></p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/02/screenmd.jpg"><img class="size-medium wp-image-259 aligncenter" title="screenMD" src="http://iphoneinsandouts.files.wordpress.com/2011/02/screenmd.jpg?w=293&#038;h=300" alt="" width="293" height="300" /></a></p>
<p>ANIMATIONS</p>
<p>How to replace the animated pictures of the golf flag in the template shaking animated:</p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/02/replace-animated-images.jpg"><img class="size-medium wp-image-274 aligncenter" title="replace animated images" src="http://iphoneinsandouts.files.wordpress.com/2011/02/replace-animated-images.jpg?w=300&#038;h=107" alt="" width="300" height="107" /></a></p>
<p>You can simply replace the red names of the pictures in the animation.</p>
<p>These animation can be found in all the four ViewControllers. FirstViewController, SecondCiewControllers</p>
<p><strong>SOUNDS</strong> (see also next post, for the lines to add to the code)</p>
<p>The sounds can be replaced copying the sound.h and sound.m files in a project (in shaking these are already included).</p>
<p>The sounds have to be formatted in .caf files using the terminal (spotlight: terminal)  and than:</p>
<p>// in terminal windows on MAC<br />
// macbook: contrechoc$ <strong>afconvert</strong> -f caff -d ima4 <strong>trill</strong>.wav<br />
// macbook: contrechoc$</p>
<p>so copy paste the:  <strong>afconvert</strong> -f caff -d ima4 <strong>trill</strong>.wav</p>
<p>and change the &#8220;trill&#8221; name.</p>
<p>Drag the resulting sound file in the project. Add or change the name in ShortSound.m</p>
<p>[soundArray addObject:[[SoundEffect alloc]initWithContentsOfFile:@&#8221;boei&#8221;]];</p>
<p>Playing your sound can be done this way:</p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/02/sound-play-command.jpg"><img class="size-medium wp-image-275 aligncenter" title="sound play command" src="http://iphoneinsandouts.files.wordpress.com/2011/02/sound-play-command.jpg?w=300&#038;h=13" alt="" width="300" height="13" /></a></p>
<p>use the name of the sound without the .caf. It needs the appdelegate, which has to be declared above.</p>
<p>ERRORS</p>
<p>If you change the code it can be wrong. Xcode gives errors like this:</p>
<p><a href="http://iphoneinsandouts.files.wordpress.com/2011/02/error.jpg"><img class="size-medium wp-image-276 aligncenter" title="error" src="http://iphoneinsandouts.files.wordpress.com/2011/02/error.jpg?w=300&#038;h=113" alt="" width="300" height="113" /></a></p>
<p>Clicking the circle right under gives the problems. May be you can solve them looking at the former code. But Xcode can be nasty if you are not used to it.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iphoneinsandouts.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iphoneinsandouts.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iphoneinsandouts.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iphoneinsandouts.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iphoneinsandouts.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iphoneinsandouts.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iphoneinsandouts.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iphoneinsandouts.wordpress.com/256/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iphoneinsandouts.wordpress.com&amp;blog=12340367&amp;post=256&amp;subd=iphoneinsandouts&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iphoneinsandouts.wordpress.com/2011/02/21/mobile-design-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/03e4efa8a397efd59f69ea79705ce144?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">contrechoc</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/02/screenmd.jpg?w=293" medium="image">
			<media:title type="html">screenMD</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/02/replace-animated-images.jpg?w=300" medium="image">
			<media:title type="html">replace animated images</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/02/sound-play-command.jpg?w=300" medium="image">
			<media:title type="html">sound play command</media:title>
		</media:content>

		<media:content url="http://iphoneinsandouts.files.wordpress.com/2011/02/error.jpg?w=300" medium="image">
			<media:title type="html">error</media:title>
		</media:content>
	</item>
	</channel>
</rss>
