<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8420067849408559187</id><updated>2024-09-13T15:37:09.129+02:00</updated><category term="iOS"/><category term="Objective-C"/><category term="Cocoa"/><category term="Asynchronous"/><category term="Php"/><category term="Beginner"/><category term="Development"/><category term="Google"/><category term="JSON"/><category term="Java"/><category term="Request"/><category term="for"/><category term="foreach"/><category term="iPad"/><category term="iPhone"/><category term="label"/><category term="latitude"/><category term="multi threaded delegate"/><category term="scrollable"/><category term="text"/><category term="text to speech"/><category term="tts"/><category term="vs"/><title type='text'>Development / Technology - Blog</title><subtitle type='html'>Blog about development related topics like objective-c, cocoa, iOS, Android, Java and PHP.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-717995458580223595</id><published>2012-09-12T09:31:00.000+02:00</published><updated>2012-09-12T09:31:09.579+02:00</updated><title type='text'>bayoom.com - meet new people</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To all you lonely developers out there ... ;o)&lt;br /&gt;
A new website just got released that is targeted at meeting new people.&lt;br /&gt;
You can search people in your area or somewhere else, chat, flirt, exchange pictures and do many more things.&lt;br /&gt;
&lt;br /&gt;
As its new its not very crowded yet but will for sure grow fast in the upcoming days.&lt;br /&gt;
You can find it at:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;a href=&quot;http://www.bayoom.com/&quot;&gt;http://www.bayoom.com&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Be one of the first users there and gain maximum attention when the crowd raises!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can register here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.bayoom.com/register&quot;&gt;&lt;b&gt;http://www.bayoom.com/register&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Or directly login with your facebook account here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.bayoom.com/fblogin&quot;&gt;&lt;b&gt;http://www.bayoom.com/fblogin&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4kTod41HF2Lvk-YTUuOeKcL6ixqCIMsU1y1C4W1lPJgAgoRdRcqMQ5u2kyyhVgYzN6bN9ojF16HLK6bQI_wsCBg9HzQ4SIPtpsy2MyNyLXCldm5_owTirOSZK9TTQv45Fr5ft25YjNIXC/s1600/logo_final_hd_256.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4kTod41HF2Lvk-YTUuOeKcL6ixqCIMsU1y1C4W1lPJgAgoRdRcqMQ5u2kyyhVgYzN6bN9ojF16HLK6bQI_wsCBg9HzQ4SIPtpsy2MyNyLXCldm5_owTirOSZK9TTQv45Fr5ft25YjNIXC/s1600/logo_final_hd_256.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/717995458580223595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2012/09/bayoomcom-meet-new-people.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/717995458580223595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/717995458580223595'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2012/09/bayoomcom-meet-new-people.html' title='bayoom.com - meet new people'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4kTod41HF2Lvk-YTUuOeKcL6ixqCIMsU1y1C4W1lPJgAgoRdRcqMQ5u2kyyhVgYzN6bN9ojF16HLK6bQI_wsCBg9HzQ4SIPtpsy2MyNyLXCldm5_owTirOSZK9TTQv45Fr5ft25YjNIXC/s72-c/logo_final_hd_256.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-4008972151831350077</id><published>2012-04-12T16:47:00.001+02:00</published><updated>2012-04-12T20:19:23.015+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="multi threaded delegate"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>Implement multi threaded / asynchronous delegate calls</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When implementing own classes with a delegate protocol it is very simple to achieve an asynchronous behaviour. To explain how it works ill describe a simple scenario:&lt;br /&gt;
&lt;br /&gt;
You have a class that searches big amount of text for keywords. This class should have a delegate protocol that calls following methods:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;//this function is called whenever the class finds a string in the text and delivers an array containing page number, line and text excerpt&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;-(void)didFindTextOnPage:(NSArray*)arrData&lt;/b&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;//function is called when search has finished&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;-(void)didFinishSearching&lt;/b&gt;;&lt;br /&gt;
&lt;br /&gt;
When these methods are called in a different thread, on the main thread e.g. a UITableView could be continuously populated with the search results and a loader could be shown to notify the user that the search is still active. When the search is finished the loader can be removed.&lt;br /&gt;
&lt;br /&gt;
All this is easily achieved with following snippet:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #eeeeee;&quot;&gt;------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;//start different thread&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
dispatch_async&lt;span class=&quot;s1&quot;&gt;( &lt;/span&gt;dispatch_get_global_queue&lt;span class=&quot;s1&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;DISPATCH_QUEUE_PRIORITY_DEFAULT&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;), ^{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;//do something in a different thread&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp;dispatch_async&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;( &lt;/span&gt;dispatch_get_main_queue&lt;span class=&quot;s1&quot;&gt;(), ^{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;//thread has finished so call final method&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;});&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
});&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span style=&quot;color: #eeeeee;&quot;&gt;------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
In the first line we start a new thread. Everything within this &quot;loop&quot; wont affect the main thread.&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
dispatch_async... is the callback that is called when the &quot;loop&quot; has finished his operations.&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
In our search example the above code could be used as follows to have a multithreaded approach:&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span style=&quot;color: #eeeeee;&quot;&gt;------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;//start different thread&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
dispatch_async&lt;span class=&quot;s1&quot;&gt;( &lt;/span&gt;dispatch_get_global_queue&lt;span class=&quot;s1&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;DISPATCH_QUEUE_PRIORITY_DEFAULT&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;s3&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;), ^{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #93c47d;&quot;&gt;//loop over pages&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;for(int i = 0; i &amp;lt; [pages count]; i++){&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; NSArray* arrLines = [NSDicionary objectAtIndex:i];&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #93c47d;&quot;&gt;//loop over lines&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; for(int j = 0; j &amp;lt; [arrLines count]; j++){&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NSArray* arrLine = [arrLines objectAtIndex:j];&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: #93c47d;&quot;&gt;//if keyword exists&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if([self keyWordExistsOnPage:i forLine:j] == YES){&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #93c47d;&quot;&gt;//call the delegate method&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;[self.delegate didFindTextOnPage: arrLine];&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span style=&quot;color: #93c47d;&quot;&gt;&amp;nbsp; &amp;nbsp;//callback for thread&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p3&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p5&quot;&gt;
&lt;span class=&quot;s1&quot;&gt;&lt;/span&gt;&lt;span class=&quot;s4&quot;&gt;&amp;nbsp; &amp;nbsp;dispatch_async&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;( &lt;/span&gt;dispatch_get_main_queue&lt;span class=&quot;s1&quot;&gt;(), ^{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #93c47d;&quot;&gt;//thread has finished so call final method&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [self.delegate didFinishSearching];&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot;&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;});&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
});&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;span style=&quot;color: #eeeeee;&quot;&gt;------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
Hope this helps. Let me know in the comments if something could be improved here or if you have another approach.&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p4&quot;&gt;
Happy coding :)&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/4008972151831350077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/implement-multi-threaded-delegate-calls.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/4008972151831350077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/4008972151831350077'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/implement-multi-threaded-delegate-calls.html' title='Implement multi threaded / asynchronous delegate calls'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-7855487478997512909</id><published>2012-04-08T08:31:00.000+02:00</published><updated>2012-04-08T08:31:19.503+02:00</updated><title type='text'>iEgg: eastern 2.0</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The iEgg defines a whole new category!&lt;br /&gt;
&lt;br /&gt;
Happy eastern :)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTl_xTumFbHM1Y005sF3_CS0CFvXjc2jUftuaJEKbwOEL8tOszNxDKmHzTEI0aT_JVoI376gjm0tzYAvxcqj8g6LtA7WgCpnuGzaIQ_8nVRm0gDvwXVpTrufhyphenhyphenwC5h7GqOlEL8QfNCyKcu/s1600/eiPod-a20259724%5B1%5D.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTl_xTumFbHM1Y005sF3_CS0CFvXjc2jUftuaJEKbwOEL8tOszNxDKmHzTEI0aT_JVoI376gjm0tzYAvxcqj8g6LtA7WgCpnuGzaIQ_8nVRm0gDvwXVpTrufhyphenhyphenwC5h7GqOlEL8QfNCyKcu/s320/eiPod-a20259724%5B1%5D.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/7855487478997512909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/iegg-eastern-20.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/7855487478997512909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/7855487478997512909'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/iegg-eastern-20.html' title='iEgg: eastern 2.0'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTl_xTumFbHM1Y005sF3_CS0CFvXjc2jUftuaJEKbwOEL8tOszNxDKmHzTEI0aT_JVoI376gjm0tzYAvxcqj8g6LtA7WgCpnuGzaIQ_8nVRm0gDvwXVpTrufhyphenhyphenwC5h7GqOlEL8QfNCyKcu/s72-c/eiPod-a20259724%5B1%5D.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-1033022759722777058</id><published>2012-04-07T16:55:00.001+02:00</published><updated>2012-04-07T17:39:36.038+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="text to speech"/><category scheme="http://www.blogger.com/atom/ns#" term="tts"/><title type='text'>iOS TTS (text-to-speech) offline and multilingual</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
I am currently working on a project where I should add text to speech functionlity.&lt;br /&gt;
I searched different blogs and forums and found several services that do TTS conversion via a webservice.&lt;br /&gt;
&lt;br /&gt;
The problem is I need an offline library that can &quot;speak&quot; several languages. The only one I found was: http://espeak.sourceforge.net/&lt;br /&gt;
this lib is okay in the simulator but for some reason on the device (ipad 2 &amp;amp; 3) the speech is horrible and speaks out single umlauts and has very strange pronunciation...&lt;br /&gt;
&lt;br /&gt;
Does somebody know a good solution for this problem (other lib or how to make eSpeak work correctly on the iPad)?&lt;br /&gt;
&lt;br /&gt;
Let me know in the comments?&lt;br /&gt;
&lt;br /&gt;
Thanks and happy coding :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/1033022759722777058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/ios-tts-text-to-speech-offline-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/1033022759722777058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/1033022759722777058'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/ios-tts-text-to-speech-offline-and.html' title='iOS TTS (text-to-speech) offline and multilingual'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-2573446674689144901</id><published>2012-04-07T16:41:00.000+02:00</published><updated>2012-04-07T17:39:21.175+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="label"/><category scheme="http://www.blogger.com/atom/ns#" term="scrollable"/><category scheme="http://www.blogger.com/atom/ns#" term="text"/><title type='text'>scrollable label / text</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
The last years i used a uiscrollview and added a label onto it. After that i calculated the size of the text height and did set the contentSize property of the scrollview. All this is not necessary by using a simple trick.&lt;br /&gt;
&lt;br /&gt;
I wasn&#39;t aware of this before and maybe most people do it this way but in case somebody didn&#39;t know it here the very simple solution:&lt;br /&gt;
&lt;br /&gt;
add a textview and set the editable property to no. That&#39;s it.&lt;br /&gt;
&lt;br /&gt;
Happy coding :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/2573446674689144901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/scrollalble-label-text.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/2573446674689144901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/2573446674689144901'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2012/04/scrollalble-label-text.html' title='scrollable label / text'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-7163545306769987980</id><published>2010-12-18T17:29:00.002+01:00</published><updated>2010-12-18T20:12:23.529+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Beginner"/><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>Explanation of method headers in objective-c (for beginners)</title><content type='html'>This is a short explanation for beginners coming from other languages like Java or PHP to show how classes are instantiated and how methods are called and defined.&lt;br /&gt;
&lt;br /&gt;
To define a method in programming languages you usually have 3-4 Parts:&lt;br /&gt;
&lt;br /&gt;
1.) Keyword to say that you are about to implement a method (e.g. function)&lt;br /&gt;
2.) What kind of object will the method return or void if nothing&lt;br /&gt;
3.) The method name&lt;br /&gt;
4.) Parameters&lt;br /&gt;
&lt;br /&gt;
Lets say we have a class called calculator.&lt;br /&gt;
In this class we want to implement a method called increment. This method gets an integer and returns the integer incremented by one.&lt;br /&gt;
This method would look in &lt;b&gt;php &lt;/b&gt;like this:&lt;br /&gt;
&lt;br /&gt;
function increment($prmInt){&lt;br /&gt;
&amp;nbsp;&amp;nbsp; return $prmInt++; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
In &lt;b&gt;objective-c&lt;/b&gt; the same method would look like this:&lt;br /&gt;
&lt;br /&gt;
-(int)increment:(int)intSomeNumber{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; return intSomeNumber++; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&quot;-&quot;&lt;i&gt;&amp;nbsp;&amp;nbsp; &lt;/i&gt;&lt;/b&gt;&lt;i&gt;is equal to the word &quot;function&quot; and tells the compiler that a method starts&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&quot;(int)&quot; &amp;nbsp; &lt;/b&gt;&lt;i&gt;defines what will be send back by the method&lt;/i&gt; &lt;i&gt;(void if nothing)&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&quot;increment&quot;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;i&gt;this is the method name&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&quot;:&quot;&lt;i&gt;&amp;nbsp;&amp;nbsp; &lt;/i&gt;&lt;/b&gt;&lt;i&gt;tells the compiler that a parameter starts&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&quot;(int)intSomeNumber&quot;&lt;/b&gt;&lt;i&gt;&amp;nbsp;&amp;nbsp; type and name of parameter&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to create a method with several parameters you can just add &quot;:&quot; and some text at the end.&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
-(&lt;i&gt;void&lt;/i&gt;)&lt;b&gt;doSomething&lt;/b&gt;:(&lt;i&gt;NSString&lt;/i&gt;*)strParameter1 &lt;b&gt;andEvenMoreParameters&lt;/b&gt;:(&lt;i&gt;NSString&lt;/i&gt;*)strParameter2;&lt;br /&gt;
-(&lt;i&gt;void&lt;/i&gt;)&lt;b&gt;aMethodWithoutTextbetweeenParameters&lt;/b&gt;:(&lt;i&gt;int&lt;/i&gt;)i1:(&lt;i&gt;int&lt;/i&gt;)i2:(&lt;i&gt;int&lt;/i&gt;)i3;&lt;br /&gt;
&lt;br /&gt;
To call these methods you have to instantiate the class:&lt;br /&gt;
&lt;br /&gt;
Calculator* calc =&amp;nbsp; [[Calculator alloc] init];&lt;br /&gt;
&lt;br /&gt;
now you have allocated an object. With this object you can call the declared method:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int intNumber = 5;&lt;br /&gt;
intNumber = [calc increment:intNumber];&lt;br /&gt;
&lt;br /&gt;
and for completeness&#39; sake:&lt;br /&gt;
&lt;br /&gt;
[calc doSomething:@&quot;string1&quot; andEvenMoreParameters:@&quot;string2&quot;];&lt;br /&gt;
[calc aMethodWithoutTextbetweeenParameters:1:2:3];&lt;br /&gt;
&lt;br /&gt;
As we don&#39;t need the object anymore we will release it so that the memory gets freed:&lt;br /&gt;
&lt;br /&gt;
[calc release];&lt;br /&gt;
&lt;br /&gt;Cheers&lt;br /&gt;
&lt;br /&gt;
JayEs &lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/7163545306769987980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/explanation-of-method-headers-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/7163545306769987980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/7163545306769987980'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/explanation-of-method-headers-in.html' title='Explanation of method headers in objective-c (for beginners)'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-4816460682076352055</id><published>2010-12-17T10:03:00.005+01:00</published><updated>2010-12-18T14:48:08.655+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="Request"/><title type='text'>Asynchronous download/request with Objective-C</title><content type='html'>For handling asynchronous request there is a very neat and simple mechanism in Objective-C.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Delegates&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The following header file defines a protocol for the delegate  and the necessary methods and data types to create a downloader that constantly pushes an update about the download state to the main thread.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Header File&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;textarea cols=&quot;25&quot; rows=&quot;3&quot; style=&quot;height: 400px; width: 450px;&quot;&gt;@protocol DownloaderDelegate;

#import &amp;lt;Foundation/Foundation.h&amp;gt;

@interface Downloader : NSObject {
   
    id &amp;lt;DownloaderDelegate&amp;gt; delegate;
   
    NSString* strFileNameWithPath;
   
    NSURLConnection* connection;
   
    CGFloat floatTotalData;
    CGFloat floatReceivedData;
}

@property(nonatomic, retain) NSString* strFileNameWithPath;
@property(nonatomic, retain) id &amp;lt;DownloaderDelegate&amp;gt; delegate;

-(void)loadData;
-(float)getProgressInPercent;

@end

@protocol DownloaderDelegate &amp;lt;NSObject&amp;gt;

@optional
-(void)didReceiveData:(Downloader *)d; //will be called each time data has been received
-(void)didLoadData:(Downloader *)d; //will be called when the download has finished
@end

&lt;/textarea&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Implementation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;textarea cols=&quot;25&quot; rows=&quot;3&quot; style=&quot;height: 400px; width: 450px;&quot;&gt;#import &quot;Downloader.h&quot;

@implementation Downloader

@synthesize strFileNameWithPath;
@synthesize delegate;


-(void)loadData{
   
    floatTotalData = 100;
    floatReceivedData = 0;
   
    self.strFileNameWithPath        = [[NSHomeDirectory() stringByAppendingPathComponent:@&quot;Documents&quot;] stringByAppendingPathComponent:@&quot;tmp&quot;];
    self.strFileNameWithPath        = [self.strFileNameWithPath  stringByAppendingPathComponent:@&quot;someFile.zip&quot;];
   
    [[NSFileManager defaultManager] createFileAtPath:self.strFileNameWithPath contents:nil attributes:nil];
   
    NSMutableURLRequest *request    = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@&quot;http://url.com/getData.php&quot;]];


    //this block shall show how to add POST variables to the request
    NSString *encodedParameterPairs    = [NSString stringWithFormat:@&quot;uid=%@&quot;, [[UIDevice currentDevice] uniqueIdentifier]];
    NSData *requestData                = [encodedParameterPairs dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
   
    [request setHTTPMethod: @&quot;POST&quot;];
    [request setHTTPBody:requestData];
   
    [NSURLConnection connectionWithRequest:request delegate:self]; //request is send here
}


- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
    //store how big file is going to be
    floatTotalData = [[NSString stringWithFormat:@&quot;%lli&quot;,[response expectedContentLength]] floatValue];
}


- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
   
    floatReceivedData += [data length];
    

    //add new data to the end of the file
    NSFileHandle *fileHandle = [NSFileHandle fileHandleForUpdatingAtPath: self.strFileNameWithPath];
    [fileHandle seekToEndOfFile];
    [fileHandle writeData: data];
    [fileHandle closeFile];
    

   //if delegate did implement the method didReceiveData let him know about the new data
    if ([self.delegate respondsToSelector:@selector(didReceiveData:)])
        [self.delegate didReceiveData:self];
}


- (void)connectionDidFinishLoading:(NSURLConnection *)connection {


  //do something with the received data....

  //and let the delegate know that the download has finished

  if ([self.delegate respondsToSelector:@selector(didLoadData:)])
        [self.delegate didLoadData:self];
}


-(float)getProgressInPercent{

   //if you want to show a progressbar or something similar call this method in

   //the delegate method didReceiveData
    return (floatReceivedData / floatTotalData) * 100.0f;
}

- (void)dealloc {
   //free memory
    [strFileNameWithPath release], strFileNameWithPath = nil;
    delegate = nil;
   
    [super dealloc];
}

@end

&lt;/textarea&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This implementation is ment for big files like 200 MB zip files. If you just want to download small stuff like an image u can instead of writing into a file use a NSData object.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this tutorial did help. Feel free to post some code improvements or questions in the comments?&lt;br /&gt;
&lt;br /&gt;
P.S.: Will look for a nicer way to post code in blogger. For the moment I don&#39;t have a lot of time (child n.3 was born two days ago... ;o) ) so ill leave it this way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
&lt;br /&gt;
JayEs&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;
Here the code as Pastie-link:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://pastie.org/1387311&quot; target=&quot;_blank&quot;&gt;header-file&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pastie.org/1387285&quot; target=&quot;_blank&quot;&gt;implementation&lt;/a&gt;&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/4816460682076352055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/asynchronous-downloadrequest-with.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/4816460682076352055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/4816460682076352055'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/asynchronous-downloadrequest-with.html' title='Asynchronous download/request with Objective-C'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-4244447172737164134</id><published>2010-12-14T21:39:00.001+01:00</published><updated>2010-12-14T21:41:25.243+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="latitude"/><title type='text'>google latitude in app store</title><content type='html'>Even this blogs main purpose is to write about development here and there ill post apps,technologies and tools i find especially usefull or cool....&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Google latitude&lt;/b&gt; hit the app store this week and I must say its great. It took some time to come over from Android but it finally made it.
I already felt in love with it on my old HTC Magic and am really happy about the look and feel on iOS.&lt;br /&gt;
&lt;br /&gt;
Hope to see many more Google Apps on iOS Devices (even though they have there own OS) in the future...</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/4244447172737164134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/google-latitude-in-app-store.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/4244447172737164134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/4244447172737164134'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/google-latitude-in-app-store.html' title='google latitude in app store'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-8950377017812689491</id><published>2010-12-14T09:34:00.001+01:00</published><updated>2010-12-14T09:36:39.474+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="iPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><title type='text'>JSON in iPhone/iPad App</title><content type='html'>For you out there searching for a good JSON library for your iOS project this is the one Im using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a target=&quot;_blank&quot; href=&quot;https://github.com/stig/json-framework/downloads&quot;&gt;https://github.com/stig/json-framework/downloads&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Howto use:&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt; &lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Add folder to your project&lt;/li&gt;
&lt;li&gt;Import the header file (#import &quot;JSON.h&quot;)&lt;/li&gt;
&lt;li&gt;When you have a NSString containing JSON data simply use: [strSomeString JSONValue]; and you get an NSDictionary/NSArray&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Very simple :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cheers,&lt;br /&gt;
&lt;br /&gt;
JayEs</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/8950377017812689491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/json-in-iphoneipad-app.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/8950377017812689491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/8950377017812689491'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/json-in-iphoneipad-app.html' title='JSON in iPhone/iPad App'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-63863410508786797</id><published>2010-12-13T09:33:00.000+01:00</published><updated>2010-12-13T09:33:39.224+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="for"/><category scheme="http://www.blogger.com/atom/ns#" term="foreach"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="Php"/><category scheme="http://www.blogger.com/atom/ns#" term="vs"/><title type='text'>For/Foreach -&gt; php vs objective-c</title><content type='html'>Lets start with a short Post about for/foreach PHP vs Objective-C &lt;br /&gt;
&amp;nbsp;To loop through an array in php is very simple:&lt;br /&gt;
&lt;br /&gt;
foreach($arrData as $key =&amp;gt; $value){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //do something...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
for($i = 0; $i &amp;lt; count($arrData); $i++){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; //do somethin...&amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
In Objective-C you have similar possibilities but you have to be sure what kind of object you are dealing with e.g. NSDictionary* or NSArray*&lt;br /&gt;
&lt;br /&gt;
To get an Element of these two types you do as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;NSDictionary&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
NSDictionary* arrData = ...;&lt;br /&gt;
&amp;nbsp;[arrData objectForKey:@&quot;id&quot;];&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Loop&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
for (NSString* key in arrData) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; id value = [arrData objectForKey:key];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;NSArray&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NSArray* arrData = ...;&lt;br /&gt;
&amp;nbsp;[arrData objectAtIndex:1];&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Loop&lt;/b&gt;&lt;br /&gt;
 &lt;br /&gt;
for (int i = 0; i &amp;lt; [arrData count]; i++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [arrData objectAtIndex:i];&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
Besides these options you can also use enumerateKeysAndObjectsWithOptions. But I personaly dislike it cause it &quot;feels&quot; bad.&lt;br /&gt;
&lt;br /&gt;
If you have an array of similar objects and you want all of them to perform the same selector you can also do this:&lt;br /&gt;
&lt;br /&gt;
[[self.view subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];&lt;br /&gt;
&lt;br /&gt;
This will save you some lines of code and is very &quot;readable&quot;.&lt;br /&gt;
&lt;br /&gt;
Cheers&lt;br /&gt;
&lt;br /&gt;
JayEs</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/63863410508786797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/forforeach-php-vs-objective-c.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/63863410508786797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/63863410508786797'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/forforeach-php-vs-objective-c.html' title='For/Foreach -&gt; php vs objective-c'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8420067849408559187.post-6424770395477374850</id><published>2010-12-12T16:03:00.000+01:00</published><updated>2010-12-12T16:03:42.306+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cocoa"/><category scheme="http://www.blogger.com/atom/ns#" term="Development"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Objective-C"/><category scheme="http://www.blogger.com/atom/ns#" term="Php"/><title type='text'>First Post</title><content type='html'>This is going to be a blog about dev and tech related topics.&lt;br /&gt;
The main topics regarding development will be:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Objective-C / Cocoa&lt;/li&gt;
&lt;li&gt; PHP&lt;/li&gt;
&lt;li&gt;Java / Android&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;Like many developers when faceing a specific problem I often start googling for it to see how other people solved it. This Blog shall show code blogs I found usefull or highlight specific topics the community asks for. To help others out there trying to solve a task...</content><link rel='replies' type='application/atom+xml' href='http://jayes-dev.blogspot.com/feeds/6424770395477374850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/first-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/6424770395477374850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8420067849408559187/posts/default/6424770395477374850'/><link rel='alternate' type='text/html' href='http://jayes-dev.blogspot.com/2010/12/first-post.html' title='First Post'/><author><name>JayEs</name><uri>http://www.blogger.com/profile/09394969658632890933</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>