<?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>dogan kaya berktas &#187; iphone</title>
	<atom:link href="http://doganberktas.com/category/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://doganberktas.com</link>
	<description>is actually from a small planet somewhere in the vicinity of Betelgeuse</description>
	<lastBuildDate>Thu, 26 Jan 2012 00:29:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>iOS and Custom Fonts</title>
		<link>http://doganberktas.com/2012/01/26/ios-and-custom-fonts/</link>
		<comments>http://doganberktas.com/2012/01/26/ios-and-custom-fonts/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 22:52:51 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[custom fonts]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[HelveticaNeue]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=793</guid>
		<description><![CDATA[Recently, I was working on a game with Cocos2d and keep getting this weird iOS version problem. On iOS 5, all my labels were shown as expected but on iOS 4 labels somehow kept disappearing. First I thought this is because of the retina display and point/pixels stuff. However, it was because of the fonts I was [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Crazy quilt collage, is this Cubism (Hockney anyone?) or is this a Fauvist mess?" href="http://flickr.com/photos/23642817@N00/2478897091"><br />
</a></p>
<p>Recently, I was working on a game with Cocos2d and keep getting this weird iOS version problem. On iOS 5, all my labels were shown as expected but on iOS 4 labels somehow kept disappearing. First I thought this is because of the retina display and point/pixels stuff. However, it was because of the fonts I was using. HelveticaNeue-CondensedBold and HelveticaNeue-CondensedBlack are available on iOS 5, but not on iOS 4 (<a href="http://iosfonts.com/" target="_blank">http://iosfonts.com/</a>).</p>
<p><a title="Crazy quilt collage, is this Cubism (Hockney anyone?) or is this a Fauvist mess?" href="http://flickr.com/photos/23642817@N00/2478897091"><img class="aligncenter" src="http://farm4.static.flickr.com/3086/2478897091_02ac5a97fb.jpg" alt="" width="309" height="500" /></a></p>
<p>I googled to see how easy to add custom fonts and it turned out, it is super easy.</p>
<p>These are the links I found helpful:</p>
<ul>
<li>Adding custom fonts by Dave Allanson (<a href="http://www.daveallanson.com/index.php?option=com_content&amp;view=article&amp;id=56:adding-custom-fonts-ios-4&amp;catid=38:blog&amp;Itemid=56" target="_blank">link</a>)</li>
<li>Using Custom Fonts by M. Arsalan Anwar (<a href="http://arsalananwar.blogspot.com/2010/10/using-custom-fonts-on-iphoneipad.html" target="_blank">link</a>)</li>
</ul>
<div><strong>Steps to Add Custom Font:</strong></div>
<div>1. Add font files to project</div>
<div>2. Open your Info.plist file</div>
<div>3. Create the key &#8220;UIAppFonts&#8221;  as Array (it will be shown as &#8220;Fonts provided by application&#8221;  if you are not on Ras Key/Value state, right click and you will see what I mean)</div>
<div>4. Add the fonts to the array</div>
<div><a href="http://doganberktas.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-25-at-2.43.30-PM.png"><img class="alignnone size-medium wp-image-796" title="Screen Shot 2012-01-25 at 2.43.30 PM" src="http://doganberktas.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-25-at-2.43.30-PM-300x34.png" alt="" width="300" height="34" /></a></div>
<div>5. In your code, you can use these fonts as if you are using the regular ones (without the file extension).</div>
<div><strong>Drawing Problems:</strong></div>
<div>If you get the fonts from Adobe, we will get a drawing problem like mentioned <a href="http://stackoverflow.com/questions/5414730/custom-installed-font-not-displayed-correctly-in-uilabel">here</a>. You need to follow the steps <a href="http://stackoverflow.com/questions/7535498/uibutton-custom-font-vertical-alignment/8314197#8314197">here</a>, change the font file&#8217;s ascender property. Don&#8217;t worry it is not that scary as it seems <img src='http://doganberktas.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Don&#8217;t forget to install Apple Font Tool Suite from <a href="http://developer.apple.com/fonts/">here</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2012/01/26/ios-and-custom-fonts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Animating Views with iPhone Keyboard</title>
		<link>http://doganberktas.com/2011/02/21/animating-views-with-iphone-keyboard/</link>
		<comments>http://doganberktas.com/2011/02/21/animating-views-with-iphone-keyboard/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 11:29:48 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[NSNotificationCenter]]></category>
		<category><![CDATA[UIKeyboardWillHideNotification]]></category>
		<category><![CDATA[UIKeyboardWillShowNotification]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=765</guid>
		<description><![CDATA[Keyboards on iPhone can be a headache with their half screen size, especially when you have many input fields on a single view. Animating the view in an elegant way so that the input fields are always visible to the user  requires to slide up or down with the keyboard synchronously. Following is a very simple view [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Swimming In The iPool" href="http://flickr.com/photos/83346641@N00/3420540107"><img src="http://farm4.static.flickr.com/3378/3420540107_f71054f41f.jpg" alt="" /></a>Keyboards on iPhone can be a headache with their half screen size, especially when you have many input fields on a single view. Animating the view in an elegant way so that the input fields are always visible to the user  requires to slide up or down with the keyboard synchronously.</p>
<p>Following is a very simple view based project, that will demonstrate animating view with keyboard slide up/down.<br />
But first, let&#8217;s see the problem. If you don&#8217;t change your view positioning when the keyboard becomes visible, basically you are likely to get something like this:</p>
<p style="text-align: center;"><a href="http://doganberktas.com/wp-content/uploads/2011/02/Screen-shot-2011-02-21-at-2.06.19-AM.png"><img class="size-full wp-image-768  aligncenter" title="Screen shot 2011-02-21 at 2.06.19 AM" src="http://doganberktas.com/wp-content/uploads/2011/02/Screen-shot-2011-02-21-at-2.06.19-AM.png" alt="" width="396" height="744" /></a><a href="http://doganberktas.com/wp-content/uploads/2011/02/Screen-shot-2011-02-21-at-2.06.27-AM.png"><img class="size-full wp-image-767  aligncenter" title="Screen shot 2011-02-21 at 2.06.27 AM" src="http://doganberktas.com/wp-content/uploads/2011/02/Screen-shot-2011-02-21-at-2.06.27-AM.png" alt="" width="396" height="744" /></a></p>
<p>To fix that, what should be done is to listen the keyboard slide up/down notifications through the NSNotificationCenter, which viewWillAppear is a good place to start listening these two notifications.</p>
<pre>-(void)viewWillAppear:(BOOL)animated
{
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slideUpView:) name:UIKeyboardWillShowNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slideDownView:) name:UIKeyboardWillHideNotification object:nil];
}</pre>
<p>Second step is to change the positioning of the components according to the animation of the keyboard. The following methods are called when there is a notification from the keyboard:</p>
<pre>-(void)slideDownView:(NSNotification*)notification
{
	[[[notification userInfo] objectForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&amp;animationCurve];
    [[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&amp;animationDuration];
    [[[notification userInfo] objectForKey:UIKeyboardBoundsUserInfoKey] getValue:&amp;keyboardFrame];

	[UIView animateWithDuration:animationDuration
				delay:0.0
				options:animationCurve
				animations:^{
					self.view.frame = CGRectMake(0, 0, 320, 480);
				}
				completion:^(BOOL finished){
					NSLog(@"Slide down Done..!");
				}];
}

-(void)slideUpView:(NSNotification*)notification
{
    [[[notification userInfo] objectForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&amp;animationCurve];
    [[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&amp;animationDuration];
    [[[notification userInfo] objectForKey:UIKeyboardBoundsUserInfoKey] getValue:&amp;keyboardFrame];
	//
	[UIView animateWithDuration:animationDuration
				delay:0.0
				options:animationCurve
				animations:^{
					self.view.frame = CGRectMake(0, -keyboardFrame.size.height + 70, 320, 416);
				}
				completion:^(BOOL finished){
					NSLog(@"Slide up Done..!");
				}];
}</pre>
<p>Don&#8217;t forget to add .h file the following declarations:</p>
<pre>// in controller's .h file
NSTimeInterval animationDuration;
UIViewAnimationCurve animationCurve;
CGRect keyboardFrame;</pre>
<p>The final result is something like this</p>
<p style="text-align: center;"><a href="http://doganberktas.com/wp-content/uploads/2011/02/Screen-shot-2011-02-21-at-3.22.16-AM.png"><img class="aligncenter" title="Screen shot 2011-02-21 at 3.22.16 AM" src="http://doganberktas.com/wp-content/uploads/2011/02/Screen-shot-2011-02-21-at-3.22.16-AM.png" alt="" width="396" height="744" /></a></p>
<p>note 1: Feel free to download the source code (<a href="http://doganberktas.com/code/SlideUpWithKeyboard.zip">link</a>). It also includes the slide down via the button.<br />
note 2: The licence to this peace of code is <a href="http://en.wikipedia.org/wiki/Beerware">Beerware</a>, In short, &#8220;Should the user of the product meet the author and consider the software useful, he is encouraged to buy the author a <a href="http://en.wikipedia.org/wiki/Beer">beer</a> &#8216;in return&#8217; (or, in some variations, drink a beer in the author&#8217;s honor).&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2011/02/21/animating-views-with-iphone-keyboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Data Storage Alternatives on iOS (in a Nutshell)</title>
		<link>http://doganberktas.com/2010/10/16/data-storage-alternatives-on-ios-in-a-nutshell/</link>
		<comments>http://doganberktas.com/2010/10/16/data-storage-alternatives-on-ios-in-a-nutshell/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 20:27:00 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[data managements]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=687</guid>
		<description><![CDATA[Below you can find the summary of available alternatives for storing data on iOS based machines. Mainly, which one to use depends on your needs like size of data, need of concurrency, access speed, etc. NSUserDefaults Based on plists Store lightweight app state Tutorial (link) Plist &#8212; Writing everything out as a plist Not suitable [...]]]></description>
			<content:encoded><![CDATA[<p><a title="The Sheep, and we Twitter Sheep can follow these 10 great photographers!" href="http://flickr.com/photos/95572727@N00/3440978820"><img class="alignnone" src="http://farm4.static.flickr.com/3414/3440978820_cf8c782674.jpg" alt="" width="500" height="332" /></a></p>
<p><a title="The Sheep, and we Twitter Sheep can follow these 10 great photographers!" href="http://flickr.com/photos/95572727@N00/3440978820"></a>Below you can find the summary of available alternatives for storing data on iOS based machines. Mainly, which one to use depends on your needs like size of data, need of concurrency, access speed, etc.</p>
<ul>
<li>NSUserDefaults
<ul>
<li>Based on plists</li>
<li>Store lightweight app state</li>
<li>Tutorial (<a href="http://icodeblog.com/2008/10/03/iphone-programming-tutorial-savingretrieving-data-using-nsuserdefaults/">link</a>)</li>
</ul>
</li>
<li>Plist &#8212; Writing everything out as a plist
<ul>
<li>Not suitable for complex model objects</li>
<li>Faster than NSUserDefaults</li>
<li>How to load a plist (<a href="http://code.davidjanes.com/blog/2009/03/23/how-to-load-a-plist-in-an-iphone-application/">link</a>)</li>
<li>Write &amp; Read data to .plist (<a href="http://ipgames.wordpress.com/tutorials/writeread-data-to-plist-file/">link</a>)</li>
</ul>
</li>
<li>Archived Objects
<ul>
<li>Conteptual guide (<a title="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Archiving/Archiving.html%23//apple_ref/doc/uid/10000047-SW1" href="http://">link</a>)</li>
<li>Archives provide a means to convert objects and values into an architecture-independent stream of bytes that preserves the identity of and the relationships between the objects and values.</li>
<li>Serialization converts Objective-C types to and from an architecture-independent byte stream. In contrast to archiving, basic serialization does not record the data type of the values nor the relationships between them; only the values themselves are recorded. Arbitrary objects cannot be serialized. Only instances of NSArray, NSDictionary, NSString, NSDate, NSNumber, and NSData (and some of their subclasses) can be serialized. (<a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Archiving/Articles/objectgraphs.html">link</a>)</li>
<li>Forum post about how to use archiver (<a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/3369-archiving-object-nskeyedarchiver-sqlite-coredata.html">link</a>)</li>
</ul>
</li>
<li>The joy of SQLite
<ul>
<li>Basically a local file act like a database server</li>
<li>Not very good for extreme concurrent access</li>
<li>A step by step tutorial (<a href="http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/">link</a>)</li>
</ul>
</li>
<li>Core Data
<ul>
<li>Higher abstraction layer than SQLite</li>
<li>Save&amp;load model objects</li>
<li>ORM (Rails ActiveRecord, Java Hibernate)</li>
<li>Use NSPredicate for in memory filtering</li>
<li>Apple Dev Center Article (<a href="http://developer.apple.com/macosx/coredata.html">link</a>)</li>
</ul>
</li>
<li>Web Services
<ul>
<li>Store &amp; access remote data</li>
<li>XML and Json parsers</li>
</ul>
</li>
</ul>
<p>ps. Related Stackoverflow <a href="http://stackoverflow.com/questions/934878/iphone-plist-or-sqlite-for-static-data">entry</a></p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/10/16/data-storage-alternatives-on-ios-in-a-nutshell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iOS Shouldn&#8217;t Have 6 Device Orientations</title>
		<link>http://doganberktas.com/2010/08/30/ios-shouldnt-have-6-device-orientations/</link>
		<comments>http://doganberktas.com/2010/08/30/ios-shouldnt-have-6-device-orientations/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 19:47:51 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[device orientation]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[view controller]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=592</guid>
		<description><![CDATA[For a small iPad project, I happened to use iPad&#8217;s orientation stuff. As it turns out, there is always a catch. In UIDevice class , you see the following orientations: typedef enum { UIDeviceOrientationUnknown, UIDeviceOrientationPortrait, // Device oriented vertically, home button on the bottom UIDeviceOrientationPortraitUpsideDown, // Device oriented vertically, home button on the top UIDeviceOrientationLandscapeLeft, [...]]]></description>
			<content:encoded><![CDATA[<p>For a small iPad project, I happened to use iPad&#8217;s orientation stuff. As it turns out, there is always a catch.</p>
<p>In UIDevice class , you see the following orientations:</p>
<pre>
typedef enum
{
    UIDeviceOrientationUnknown,
    UIDeviceOrientationPortrait,            // Device oriented vertically, home button on the bottom
    UIDeviceOrientationPortraitUpsideDown,  // Device oriented vertically, home button on the top
    UIDeviceOrientationLandscapeLeft,       // Device oriented horizontally, home button on the right
    UIDeviceOrientationLandscapeRight,      // Device oriented horizontally, home button on the left
    UIDeviceOrientationFaceUp,              // Device oriented flat, face up
    UIDeviceOrientationFaceDown             // Device oriented flat, face down
} UIDeviceOrientation;
</pre>
<p>But for a view controller&#8217;s parent, there are only four</p>
<p>self.parentViewController.interfaceOrientation only has</p>
<pre>typedef enum
{
    UIInterfaceOrientationPortrait           = UIDeviceOrientationPortrait,
    UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
    UIInterfaceOrientationLandscapeLeft      = UIDeviceOrientationLandscapeRight,
    UIInterfaceOrientationLandscapeRight     = UIDeviceOrientationLandscapeLeft
} UIInterfaceOrientation;</pre>
<p>So the problem arises when you try to layout according to</p>
<pre>  [UIDevice currentDevice].orientation</pre>
<p>When the device orientation is UIDeviceOrientationFaceUp or UIDeviceOrientationFaceDown, you get 3 orientation changed calls. One is the up and down, than a landscape, than again up or down.</p>
<p>This is, to be honest, completely broken. It is clear that, since the status bar can be located to four locations on the screen, there should be 4 device orientations, not 6. The FaceUp and FaceDown should be a different property I guess (gravityOrientation or sth like that)</p>
<p>ps. Some links that can help if you have issues with this up&amp;down thing</p>
<ul>
<li><a href="http://blogs.remobjects.com/blogs/mh/2010/06/29/p1685">Handling UIDeviceOrientationFaceUp &amp; UIDeviceOrientationFaceDown </a></li>
<li><a href="http://www.cocos2d-iphone.org/forum/topic/6413">http://www.cocos2d-iphone.org/forum/topic/6413</a></li>
<li><a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/45799-ipad-device-orientation-face-up.html">http://www.iphonedevsdk.com/forum/iphone-sdk-development/45799-ipad-device-orientation-face-up.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/08/30/ios-shouldnt-have-6-device-orientations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Short Sound Clips to iPhone/iPad Apps</title>
		<link>http://doganberktas.com/2010/08/24/adding-short-sound-clips-to-iphoneipad-apps/</link>
		<comments>http://doganberktas.com/2010/08/24/adding-short-sound-clips-to-iphoneipad-apps/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 15:20:24 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[ios4]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[system audio API]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=579</guid>
		<description><![CDATA[There are lots of ways of playing/recording audio in your iPhone/iPad app, and probably this is why it took me a while to decide which one to chose, Here are the alternatives (List of Audio APIs) &#8211; System Sound API &#8212; very short &#8211; limited file type &#8211; no control AVAudioPlayer class &#8212; objC Audio [...]]]></description>
			<content:encoded><![CDATA[<p>There are lots of ways of playing/recording audio in your iPhone/iPad app, and probably this is why it took me a while to decide which one to chose,</p>
<p>Here are the alternatives (List of Audio APIs) &#8211;</p>
<ul>
<li><strong>System Sound API &#8212; very short &#8211; limited file type &#8211; no control</strong></li>
<li>AVAudioPlayer class &#8212; objC</li>
<li>Audio Toolbox &#8212; recording &#8211; streaming &#8211; controls</li>
<li>Audio Units &#8212; audio processing</li>
<li>OpenAL &#8212; 3D positional sound (Yes, just like OpenGL)</li>
</ul>
<p>Since what I need is just to play a short audio clip w/out any looping or any other control, I choose System Audio API.</p>
<p>As always, Google is the first address to ask howto use System Audio AP, <a title="Permanent Link to How To Play Audio With The iPhone SDK" rel="bookmark" href="http://iphoneincubator.com/blog/tutorial/how-to-play-audio-with-the-iphone-sdk">How To Play Audio With The iPhone SDK</a> is a step by step guide, but it takes the starting point from a sample code project from Apple, which is no longer available.</p>
<p>Another one is the sample code project <a href="https://developer.apple.com/iphone/library/samplecode/SysSound/Introduction/Intro.html">SysSound</a> which contains an iOS4 specific feature so that it will not work on iPad.</p>
<p>So how to play an audio clip w/out hassling that much?</p>
<p>Here is the code snippet : (don&#8217;t forget to add the AudioToolbox framework)<br />
#include<br />
&#8230;.</p>
<pre>-(void)playSound
{
	SystemSoundID shortSound;
	NSURL* audioFile = [NSURL fileURLWithPath:[[NSBundle mainBundle]
				pathForResource:[NSString stringWithFormat:@"filename"] ofType:@"wav"]];
	AudioServicesCreateSystemSoundID((CFURLRef)audioFile, &amp;shortSound); 

	//playing it
	AudioServicesPlaySystemSound(shortSound);

	//cleanup
	AudioServicesDisposeSystemSoundID(shortSound);

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/08/24/adding-short-sound-clips-to-iphoneipad-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Summary of Web Application Libraries for iPhone</title>
		<link>http://doganberktas.com/2010/07/17/summary-of-web-application-libraries-for-iphone/</link>
		<comments>http://doganberktas.com/2010/07/17/summary-of-web-application-libraries-for-iphone/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 23:46:13 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iui]]></category>
		<category><![CDATA[iwebkit]]></category>
		<category><![CDATA[jqtouch]]></category>
		<category><![CDATA[pastrykit]]></category>
		<category><![CDATA[sencha touch]]></category>
		<category><![CDATA[spoutcore]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=437</guid>
		<description><![CDATA[PastryKit &#8212; it is from Apple, but it is not public,  you can see it from the iPhone User Guide, it will be released to public hopefully. http://stackoverflow.com/questions/1143589/what-is-the-pastrykit-framework http://daringfireball.net/2009/12/pastrykit http://ajaxian.com/archives/pastrykit-an-iphone-webdev-library-from-apple Sencha Touch &#8212; you should definitely see their kitchen sink, it is pretty cool.but there is no commercial license yet. http://ajaxian.com/archives/sencha-touch http://mobile.tutsplus.com/articles/news/sencha-touch-html5-mobile-framework/ http://www.endofnative.com/ iUi &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>PastryKit</strong> &#8212; it is from Apple, but it is not public,  you can see it from the <a href="http://help.apple.com/iphone/3/mobile/">iPhone User Guide</a>, it will be released to public hopefully.</p>
<ul>
<li><a href="http://stackoverflow.com/questions/1143589/what-is-the-pastrykit-framework">http://stackoverflow.com/questions/1143589/what-is-the-pastrykit-framework</a></li>
<li><a href="http://daringfireball.net/2009/12/pastrykit">http://daringfireball.net/2009/12/pastrykit</a></li>
<li><a href="http://ajaxian.com/archives/pastrykit-an-iphone-webdev-library-from-apple">http://ajaxian.com/archives/pastrykit-an-iphone-webdev-library-from-apple</a></li>
</ul>
<p><a href="http://www.sencha.com/products/touch/"><strong>Sencha Touch</strong></a> &#8212; you should definitely see their <a href="http://www.sencha.com/deploy/touch/examples/kitchensink/">kitchen sink</a>, it is pretty cool.but there is no commercial license yet.</p>
<ul>
<li><a href="http://ajaxian.com/archives/sencha-touch">http://ajaxian.com/archives/sencha-touch</a></li>
<li><a href="http://mobile.tutsplus.com/articles/news/sencha-touch-html5-mobile-framework/">http://mobile.tutsplus.com/articles/news/sencha-touch-html5-mobile-framework/</a></li>
<li><a href="http://www.endofnative.com/">http://www.endofnative.com/</a></li>
</ul>
<p style="text-align: center;"><img class="aligncenter" src="http://doganberktas.com/wp-content/uploads/2010/07/photo.png" alt="and the winner is ..." width="368" height="490" /></p>
<p><a href="http://code.google.com/p/iui/"><strong>iUi</strong></a> &#8212; not that many people using it I guess. I build a site with it, if it is sth fast and easy to learn, iUi can do the job.</p>
<ul>
<li>Sites build with iUi &#8212; <a href="http://code.google.com/p/iui/wiki/PoweredBy">http://code.google.com/p/iui/wiki/PoweredBy</a></li>
</ul>
<p><span style="color: #ff6600;"><a href="http://jqtouch.com"><strong>jqtouch</strong></a></span> &#8212; <a href="http://jqtouch.com/preview/demos/main/">demos</a> seem very nice, probably better than iUi in terms of current release capabilities and size of community.</p>
<p><a href="http://iwebkit.net/">iWebkit</a> &#8212; <a href="http://iwebkit.net/demo">demo</a> seems promising, but not ready for prime time.</p>
<p><a href="http://www.sproutcore.com/what-is-sproutcore/">SproutCore</a> &#8212; not for iPhone specificly, but its <a href="http://demo.sproutcore.com/sample_controls/">demo</a> seems nice.</p>
<p>So my choice for the next task is jqtouch. not iui this time.</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/07/17/summary-of-web-application-libraries-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet Another Hacker News iPad Reader</title>
		<link>http://doganberktas.com/2010/07/07/yet-another-hacker-news-ipad-reader/</link>
		<comments>http://doganberktas.com/2010/07/07/yet-another-hacker-news-ipad-reader/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 09:27:45 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[app store]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=375</guid>
		<description><![CDATA[A couple of weeks ago, I wanted to read Hackernews with my iPad [although some HackerNews readers see iPad’s Safari good enough for the task (which requires opening new tabs for comments,  lots of copy &#38; pasting URLs to share and  etc)], I searched for an application. Eventually, I found two, which are both paid [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">A couple of weeks ago, I wanted to read Hackernews with my iPad [although  some HackerNews readers see iPad’s Safari good enough for the task  (which requires opening new tabs for comments,  lots of copy &amp; pasting URLs to  share and  etc)], I searched for an application. Eventually, I found two, which are both paid applications. Since this applications is in my seven nights category (which is something I can code in seven consequent nights without disrupting my day work), I decided to code it myself.</p>
<p style="text-align: justify;">After 3 nights the application was ready for the submission. It got rejected since I didn&#8217;t read the iPad User guidelines carefully (actually I just skimmed it in 5 minutes). The rejection reason is &#8220;You can&#8217;t show more than one popover at the same time&#8221;. I fixed the problem, and it is available in the app store (<a href="http://dogan.appspot.com/35">App Store link</a>)</p>
<p><img class="alignnone" style="margin-left: -50px;" src="http://doganberktas.com/wp-content/uploads/2010/07/Screen-shot-2010-07-07-at-12.07.53-PM.png" alt="Yet Another Hackernews reader" width="566" height="476" /></p>
<p style="text-align: justify;">I will probably change the default RSS feed of Hackernews which only show top 30 posts. Probably something on GAE, and maybe a simple my favorites kind of thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/07/07/yet-another-hacker-news-ipad-reader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone Ad Hoc Distribution Caveats and Useful Links</title>
		<link>http://doganberktas.com/2010/06/26/iphone-ad-hoc-distribution-caveats-and-useful-links/</link>
		<comments>http://doganberktas.com/2010/06/26/iphone-ad-hoc-distribution-caveats-and-useful-links/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 03:09:44 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[ad hoc distribution]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=344</guid>
		<description><![CDATA[One of the things I learn after developing a couple of iPhone (and iPad) applications is that sometimes it can take more  time to make it to app store or installing the app to the clients device than actually developing the applications. Ad hoc distribution is one the things I really don&#8217;t like at all. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I learn after developing a couple of iPhone (and iPad) applications is that sometimes it can take more  time to make it to app store or installing the app to the clients device than actually developing the applications.</p>
<p>Ad hoc distribution is one the things I really don&#8217;t like at all.</p>
<p>These are the caveats  :</p>
<p><img src="http://doganberktas.com/wp-content/uploads/2010/06/Screen-shot-2010-06-26-at-6.08.16-AM.png" alt="" width="527" height="443" /></p>
<p>-Download the distribution provisioning profile again from the Provisioning Portal, and remove the old one (from the organizer) before installing the new one</p>
<p>-Don&#8217;t forget to add the Entitlements.plist file with the key get-task-allow and the value false. (also add it tho the target build settings as Code Signing Entitlements key )</p>
<p>- If the client uses Windows make sure use .ipa file for sending the .app</p>
<p>- It is not iTunesArtwork.png but only iTunesArtwork</p>
<p>The links that explain the process:</p>
<ul>
<li>http://johnehartzog.com/2009/04/iphone-app-ad-hoc-gotchas/</li>
<li>http://www.innerfence.com/howto/install-iphone-application-ad-hoc-distribution</li>
<li>http://www.iphonedevsdk.com/forum/iphone-sdk-development/3156-problem-iphone-ad-hoc-distribution.html</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/06/26/iphone-ad-hoc-distribution-caveats-and-useful-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Transparent Modal View Programatically&#8211; iPhone</title>
		<link>http://doganberktas.com/2010/05/18/adding-transparent-modal-view-programatically-iphone/</link>
		<comments>http://doganberktas.com/2010/05/18/adding-transparent-modal-view-programatically-iphone/#comments</comments>
		<pubDate>Tue, 18 May 2010 03:14:28 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[iphone application]]></category>
		<category><![CDATA[iphone sdk]]></category>
		<category><![CDATA[UIActivityIndicatorView]]></category>
		<category><![CDATA[uiview]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=301</guid>
		<description><![CDATA[Assuming you have a long process  taken so long that you want to show a transparent view, you can do it very easily by just adding the following method to your .m file and you will get the following transparent loading view -(void)showLoadingView { CGRect transparentViewFrame = CGRectMake(0.0, 0.0,320.0,480.0); transparentView = [[UIView alloc] initWithFrame:transparentViewFrame]; transparentView.backgroundColor [...]]]></description>
			<content:encoded><![CDATA[<p>Assuming you have a long process  taken so long that you want to show a transparent view, you can do it very easily by just adding the following method to your .m file and you will get the following transparent loading view</p>
<p style="text-align: center;"><a href="http://doganberktas.com/wp-content/uploads/2010/05/Screen-shot-2010-05-17-at-8.09.33-PM.png"><br />
<img class="size-full wp-image-302 aligncenter" style="margin-top: 10px; margin-bottom: 10px;" title="Screen shot 2010-05-17 at 8.09.33 PM" src="http://doganberktas.com/wp-content/uploads/2010/05/Screen-shot-2010-05-17-at-8.09.33-PM.png" alt="" width="414" height="770" /></a></p>
<pre>-(void)showLoadingView
{
	CGRect transparentViewFrame = CGRectMake(0.0, 0.0,320.0,480.0);
	transparentView = [[UIView alloc] initWithFrame:transparentViewFrame];
	transparentView.backgroundColor = [UIColor lightGrayColor];
	transparentView.alpha = 0.9;

	UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
	spinner.center = transparentView.center;
	[spinner startAnimating];

	UILabel *messageLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 280, 320, 30)];
	messageLabel.textAlignment = UITextAlignmentCenter;
	messageLabel.text = @"please wait...";

	[transparentView addSubview:spinner];
	[transparentView addSubview:messageLabel];

	[self.view addSubview:transparentView];

	[messageLabel release];
	[spinner release];
	[transparentView release];
}
</pre>
<p>Now, you should call this function whenever needed. Let&#8217;s say you have a background process that will run while the transparent loading view is shown, below is the code to handle this situation:</p>
<pre>-(void)myAction:(id)sender
{
	[self showLoadingView];

	[self performSelectorInBackground:@selector(myActionBackground:) withObject:sender];
}

-(void)myActionBackground:(id)sender
{
        NSAutoreleasePool *apool = [[NSAutoreleasePool alloc] init];
	//your code
        [apool release];
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/05/18/adding-transparent-modal-view-programatically-iphone/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using Memcache with Google App Engine (GAE/J)</title>
		<link>http://doganberktas.com/2010/01/18/using-memcache-with-google-app-engine-gaej-a-simple-beginning-fragman-iphone-application/</link>
		<comments>http://doganberktas.com/2010/01/18/using-memcache-with-google-app-engine-gaej-a-simple-beginning-fragman-iphone-application/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 21:39:23 +0000</pubDate>
		<dc:creator>dkberktas</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[gae]]></category>
		<category><![CDATA[gae/j]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[ifragman]]></category>
		<category><![CDATA[iphone application]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Servlet]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[Technology/Internet]]></category>

		<guid isPermaLink="false">http://doganberktas.com/?p=196</guid>
		<description><![CDATA[A simple beginning &#8212; Fragman iPhone Application Memcache provides convenience to store a frequent query in memory, so that you don&#8217;t have to make the same execution over and over again. For the iPhone application I build (Fragman), I build a GAE/J backend for managing movie names, IMDB URLs, thumb images, video files, etc. It [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A simple beginning &#8212; Fragman iPhone Application</strong></p>
<p>Memcache provides convenience to store a frequent query in memory, so that you don&#8217;t have to make the same execution over and over again. For the <a href="http://ifragman.com"><span style="color: #800000;">iPhone application I build (Fragman</span></a><span style="color: #800000;">)</span>, I build a GAE/J backend for managing movie names, IMDB URLs, thumb images, video files, etc. It interacts with the Obj-c code via calls encoded in JSON.</p>
<p>Since the categories are updated so frequently (new trailer, top 250 , soap opera trailers), every time the user starts the application from her iPhone, the corresponding categories Id(key) lists are  created which includes all the aspects mentioned above,</p>
<p>what I see, after people start to use the application that, most of the time, the application got stuck with the time constraint of GAE and  this causes inconvenience, so I decided to hold the category lists&#8217;s JSON in memory. Following is the code ,</p>
<p>this is the servlet for creating the JSON which is called after say upcoming movie list is changed. This servlet updates the memcached list</p>
<pre>        List keyList = new ArrayList();
	static Cache cache;
	static
	{
		try
		{
			CacheFactory cacheFactory =</pre>
<pre>CacheManager.getInstance().getCacheFactory();
			cache = cacheFactory.createCache(</pre>
<pre>Collections.emptyMap());
		}
		catch (CacheException e)
		{
			// ...
		}
		//.....
                public void doGet(HttpServletRequest request,</pre>
<pre>HttpServletResponse response) throws ServletException, IOException</pre>
<pre>	        {
                       //................
                       if(cache.containsKey(mode))
		       {
			     cache.remove(mode);
		       }
		       cache.put(mode, keyList);
	        }</pre>
<pre>                //........</pre>
<pre>          }</pre>
<p>And this is the servlet that fetch the Fragman beans from the datastore with the given keys (key list is got from the memecached list)</p>
<pre>          keyList = (List)cache.get(mode);</pre>
<pre>By doing this, I reduce the time that the servlet that creates the JSON takes.</pre>
]]></content:encoded>
			<wfw:commentRss>http://doganberktas.com/2010/01/18/using-memcache-with-google-app-engine-gaej-a-simple-beginning-fragman-iphone-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

