<?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/opensearch/1.1/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;DkEHQnw4fip7ImA9Wx9RE04.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433</id><updated>2010-12-14T05:50:33.236-08:00</updated><title>Grant Technology</title><subtitle type='html'>Developing softwares for iPhone</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default?redirect=false&amp;v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sam Liu</name><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry gd:etag='W/&quot;DkEHQnw_fip7ImA9Wx9RE04.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-4205366439174980097</id><published>2010-12-14T05:49:00.000-08:00</published><updated>2010-12-14T05:50:33.246-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-12-14T05:50:33.246-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone Apps'/><title>iCycle Period Logging and Prediction Free</title><content type='html'>Free iPhone app iCycle Period Logging and Prediction Free is released. Get it from &lt;a href="http://itunes.com/apps/iCyclePeriodLoggingAndPredictionFree"&gt;App Store&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-4205366439174980097?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/4205366439174980097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/12/icycle-period-logging-and-prediction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/4205366439174980097?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/4205366439174980097?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/12/icycle-period-logging-and-prediction.html' title='iCycle Period Logging and Prediction Free'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DUcFRno7eCp7ImA9Wx9SGUQ.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-8652622725663279573</id><published>2010-12-10T08:02:00.000-08:00</published><updated>2010-12-10T08:03:37.400-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-12-10T08:03:37.400-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone programming'/><title>The URL for Apps and Artists in App Store</title><content type='html'>Examples:&lt;br /&gt;
&lt;br /&gt;
http://itunes.com/XuanChen  (for computer and iphone)&lt;br /&gt;
itms://itunes.com/XuanChen  (for iphone only, only one redirection)&lt;br /&gt;
http://itunes.com/apps/XuanChen/MassageMap3D&lt;br /&gt;
itms://itunes.com/apps/XuanChen/MassageMap3D&lt;br /&gt;
&lt;br /&gt;
More info:&lt;br /&gt;
http://developer.apple.com/library/ios/#qa/qa2008/qa1633.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-8652622725663279573?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/8652622725663279573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/12/url-for-apps-and-artists-in-app-store.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/8652622725663279573?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/8652622725663279573?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/12/url-for-apps-and-artists-in-app-store.html' title='The URL for Apps and Artists in App Store'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DEAFSXw7fCp7ImA9Wx9SF0U.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-9125218468706310609</id><published>2010-12-07T21:38:00.000-08:00</published><updated>2010-12-07T21:38:38.204-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-12-07T21:38:38.204-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone programming'/><title>How to Hide Status Bar or Change Its Style in iPhone App</title><content type='html'>By default, the status bar is displayed in iPhone App. If your root view frame origin is (0,0), it will be displayed just below the status bar.&lt;br /&gt;
&lt;br /&gt;
If you want to hide the status bar, add one entry to the property list of your app:&lt;br /&gt;
&lt;br /&gt;
Status bar is initially hidden&lt;br /&gt;
&lt;br /&gt;
and make sure it is checked.&lt;br /&gt;
&lt;br /&gt;
If you want to change the style of the status bar, add one entry to the property list:&lt;br /&gt;
&lt;br /&gt;
Status bar style&lt;br /&gt;
&lt;br /&gt;
Do not try to change status bar style or hide it in Interface Builder. That is only for visualizing other views or controls, not really changing the status bar.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-9125218468706310609?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/9125218468706310609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/12/how-to-hide-status-bar-or-change-its.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/9125218468706310609?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/9125218468706310609?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/12/how-to-hide-status-bar-or-change-its.html' title='How to Hide Status Bar or Change Its Style in iPhone App'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CUAGQnY-eCp7ImA9Wx9SFU4.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-8612495347933488756</id><published>2010-12-04T23:13:00.000-08:00</published><updated>2010-12-04T23:22:03.850-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-12-04T23:22:03.850-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone programming'/><title>Error: unrecognized selector sent to instance</title><content type='html'>The error means an object does not respond to a selector sent to it. Various reasons can cause this error. Today I found another one: assigning to instance variable in class method can corrupt an object and cause it not to respond to a selector which it should.&lt;br /&gt;
&lt;br /&gt;
For example, you have a view controller vc. By all means you expect [vc.view addSubview:anotherView] should work but you got error:&lt;br /&gt;
&lt;br /&gt;
(null): unrecognized selector sent to instance 0xblah&lt;br /&gt;
&lt;br /&gt;
Then you found that this view controller has a class method which updates some instance variables. Since it worked before, you think it is OK to do that. However, after some other coding, the application was suddenly broken, and you got that error. You can still NSLog(@"%@",vc.view) and it seems to be fine, but when you check [vc.view respondsToSelector:@selector(addSubview:)] you get NO.&lt;br /&gt;
&lt;br /&gt;
This is totally insane. Then you noticed the compiler output:&lt;br /&gt;
&lt;br /&gt;
warning: instance variable 'adView' accessed in class method&lt;br /&gt;
&lt;br /&gt;
Then you remember you did something dubious: modifying instance variable in class method. In C++  such code won't compile but in objective-c it is just a warning.&lt;br /&gt;
&lt;br /&gt;
After fixing this, the error disappeared.&lt;br /&gt;
&lt;br /&gt;
The lessons learned:&lt;br /&gt;
1. Do not access instance variables in class method. Even if it works today, it may break tomorrow.&lt;br /&gt;
2. Pay attention to warnings. They said bad C++ code is like bullets which can shoot your toe. I would say objective-c is even worse.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-8612495347933488756?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/8612495347933488756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/12/error-null-unrecognized-selector-sent.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/8612495347933488756?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/8612495347933488756?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/12/error-null-unrecognized-selector-sent.html' title='Error: unrecognized selector sent to instance'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;C08HSXs5cSp7ImA9Wx9SEU0.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-3031240846967082377</id><published>2010-11-29T23:23:00.000-08:00</published><updated>2010-11-29T23:23:58.529-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-29T23:23:58.529-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone programming'/><title>UIViewController viewWillAppear not called</title><content type='html'>If you add the view of a UITabBarController as subview to another view controller. When you tap the tab bar to swap in a new view, viewWillAppear of that view's controller will not be called. This causes problem because many times you use viewWillAppear to refresh a view managed by UITabBarController.&lt;br /&gt;
&lt;br /&gt;
One workaround is to subclass UIView for the view you want to update, and move the stuff from viewWillAppear to drawRect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-3031240846967082377?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/3031240846967082377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/uiviewcontroller-viewwillappear-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/3031240846967082377?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/3031240846967082377?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/uiviewcontroller-viewwillappear-not.html' title='UIViewController viewWillAppear not called'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CkICQns4fip7ImA9Wx9TGU0.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-5784009093485513737</id><published>2010-11-27T15:29:00.000-08:00</published><updated>2010-11-27T15:29:23.536-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-27T15:29:23.536-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone programming'/><title>The Simplest Way to Add iAd Banner to Your iPhone Application</title><content type='html'>It is a bad idea to modify each view controller to add iAd banner. The simplest way to do that is to create a new root view controller and add an AdBannerView and your old root view to it. Do it in your application delegate:&lt;br /&gt;
&lt;br /&gt;
 &lt;style type="text/css"&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #7e22ac}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #490084}
span.s1 {color: #000000}
span.s2 {color: #490084}
span.s3 {color: #7e22ac}
span.s4 {color: #3f00dd}
span.s5 {color: #3a8289}
span.s6 {color: #e60b00}
span.s7 {color: #d000a2}
span.Apple-tab-span {white-space:pre}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class="p1"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;ADBannerView&lt;span class="s1"&gt; *adView = [[&lt;/span&gt;ADBannerView&lt;span class="s1"&gt; &lt;/span&gt;&lt;span class="s2"&gt;alloc&lt;/span&gt;&lt;span class="s1"&gt;] &lt;/span&gt;&lt;span class="s2"&gt;initWithFrame&lt;/span&gt;&lt;span class="s1"&gt;:&lt;/span&gt;CGRectZero&lt;span class="s1"&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;adView.&lt;/span&gt;currentContentSizeIdentifier&lt;span class="s1"&gt; = &lt;/span&gt;ADBannerContentSizeIdentifier320x50&lt;span class="s1"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;adView.&lt;span class="s3"&gt;frame&lt;/span&gt;=&lt;span class="s2"&gt;CGRectMake&lt;/span&gt;(&lt;span class="s4"&gt;0&lt;/span&gt;, &lt;span class="s4"&gt;0&lt;/span&gt;, &lt;span class="s4"&gt;320&lt;/span&gt;, &lt;span class="s4"&gt;50&lt;/span&gt;);&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="s5"&gt;AdVC&lt;/span&gt;&lt;span class="s1"&gt;* rootVC = [[&lt;/span&gt;&lt;span class="s5"&gt;AdVC&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;alloc&lt;span class="s1"&gt;] &lt;/span&gt;initWithNibName&lt;span class="s1"&gt;:&lt;/span&gt;&lt;span class="s6"&gt;@"AdVC"&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;bundle&lt;span class="s1"&gt;:&lt;/span&gt;&lt;span class="s7"&gt;nil&lt;/span&gt;&lt;span class="s1"&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span class="s5"&gt;window&lt;/span&gt;&lt;span class="s1"&gt; &lt;/span&gt;addSubview&lt;span class="s1"&gt;:rootVC.&lt;/span&gt;view&lt;span class="s1"&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;[rootVC.&lt;span class="s3"&gt;view&lt;/span&gt; &lt;span class="s2"&gt;addSubview&lt;/span&gt;:oldRootVC.&lt;span class="s2"&gt;view&lt;/span&gt;];&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;[rootVC.&lt;span class="s3"&gt;view&lt;/span&gt; &lt;span class="s2"&gt;addSubview&lt;/span&gt;:adView];&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="s1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;rootVC.&lt;/span&gt;view&lt;span class="s1"&gt;.&lt;/span&gt;frame&lt;span class="s1"&gt; = &lt;/span&gt;&lt;span class="s5"&gt;window&lt;/span&gt;&lt;span class="s1"&gt;.&lt;/span&gt;screen&lt;span class="s1"&gt;.&lt;/span&gt;applicationFrame&lt;span class="s1"&gt;;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p2"&gt;oldRootVC.&lt;span class="s3"&gt;view&lt;/span&gt;.&lt;span class="s3"&gt;frame&lt;/span&gt;=&lt;span class="s2"&gt;CGRectMake&lt;/span&gt;(&lt;span class="s4"&gt;0&lt;/span&gt;, &lt;span class="s4"&gt;50&lt;/span&gt;, &lt;span class="s4"&gt;320&lt;/span&gt;, &lt;span class="s4"&gt;480&lt;/span&gt;-&lt;span class="s4"&gt;50&lt;/span&gt;-&lt;span class="s4"&gt;20&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
This will add a banner to all of your views, and it also allows you to easily remove the banner if the user choose to upgrade.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-5784009093485513737?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/5784009093485513737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/simplest-way-to-add-iad-banner-to-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/5784009093485513737?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/5784009093485513737?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/simplest-way-to-add-iad-banner-to-your.html' title='The Simplest Way to Add iAd Banner to Your iPhone Application'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;A04DR38_fSp7ImA9Wx9TGEQ.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-150456736942088330</id><published>2010-11-27T15:18:00.000-08:00</published><updated>2010-11-27T15:19:36.145-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-27T15:19:36.145-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone programming'/><title>How to fix status bar covering UIView</title><content type='html'>Sometime it is annoying that the status bar covers your UIView, and there are various other problems about the view location.&lt;br /&gt;
&lt;br /&gt;
A simple fix is&lt;br /&gt;
&lt;br /&gt;
rootVC.view.frame = window.screen.applicationFrame;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-150456736942088330?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/150456736942088330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/how-to-fix-status-bar-covering-uiview.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/150456736942088330?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/150456736942088330?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/how-to-fix-status-bar-covering-uiview.html' title='How to fix status bar covering UIView'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;AkYAR3o_fCp7ImA9Wx9TGEs.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-204022411052722424</id><published>2010-11-27T06:29:00.000-08:00</published><updated>2010-11-27T06:29:06.444-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-27T06:29:06.444-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='Xcode'/><title>Xcode error: No launchable executable present at path</title><content type='html'>If this error shows up after the name of the executable changes in Xcode, restarting Xcode could solve this problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-204022411052722424?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/204022411052722424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/xcode-error-no-launchable-executable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/204022411052722424?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/204022411052722424?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/xcode-error-no-launchable-executable.html' title='Xcode error: No launchable executable present at path'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CUcBQXY4fCp7ImA9Wx9TFEQ.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-7225990452641702158</id><published>2010-11-22T22:17:00.000-08:00</published><updated>2010-11-22T22:17:30.834-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-22T22:17:30.834-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='cocos2d'/><title>Cocos2d v0.99.5-rc1 not working with Xcode 3.2.4</title><content type='html'>There are lots of compilation errors using the default project file of cocos2d v0.99.5-rc1 with Xcode 3.2.4.&lt;br /&gt;
&lt;br /&gt;
Use gcc or llvm-gcc instead of llvm, then it is OK.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-7225990452641702158?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/7225990452641702158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/cocos2d-v0995-rc1-not-working-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/7225990452641702158?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/7225990452641702158?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/cocos2d-v0995-rc1-not-working-with.html' title='Cocos2d v0.99.5-rc1 not working with Xcode 3.2.4'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;AkYGQ3g5fip7ImA9Wx9TFEo.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-8693699491432745046</id><published>2010-11-22T18:07:00.000-08:00</published><updated>2010-11-22T18:08:42.626-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-22T18:08:42.626-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='inkscape'/><title>How to Enter Copyright Symbol in Inkscape</title><content type='html'>When inputing text, press Control to enter Unicode, then enter 00a9 for copyright symbol.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-8693699491432745046?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/8693699491432745046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/how-to-enter-copyright-symbol-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/8693699491432745046?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/8693699491432745046?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/how-to-enter-copyright-symbol-in.html' title='How to Enter Copyright Symbol in Inkscape'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;Dk8DR3w8fip7ImA9Wx5aGEo.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-4638452105765972748</id><published>2010-11-15T18:21:00.000-08:00</published><updated>2010-11-15T18:34:36.276-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-15T18:34:36.276-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='iPhone Apps'/><title>Massage Map 3D is ready for sale in iPhone App Store.</title><content type='html'>Acupressure is a form of massage based on acupuncture points. Ancient Chinese found that stimulating special locations on the human body can relieve pain or ailments. These special locations are called acupuncture or acupressure points.&lt;br /&gt;
&lt;br /&gt;
Massage Map 3D is the first software to provide an accurate and clear three dimensional map of all important acupressure points on human body. It is useful to people who are new to acupressure and also professional massage therapists.&lt;br /&gt;
&lt;br /&gt;
The features include:&lt;br /&gt;
&lt;br /&gt;
- Uses standard acupressure point code names based on authoritative acupressure and acupuncture books&lt;br /&gt;
- Includes both English and Chinese pinyin names for acupressure points&lt;br /&gt;
- Click an ailment to find the acupressure points that relieve it&lt;br /&gt;
- Ailments are organized by body parts or systems&lt;br /&gt;
- Browse acupressure points by code names&lt;br /&gt;
- The location of acupressure points are based on authoritative acupressure and acupuncture books&lt;br /&gt;
- The 3D human body can be rotated, moved and zoomed-in for better view of the acupressure points&lt;br /&gt;
- Includes detailed and professional instructions about how to locate the acupressure points&lt;br /&gt;
- Integrated with web search and wikipedia for images and webpages of acupressure points, anatomical and medical terms&lt;br /&gt;
- Includes basic instructions about how to locate acupressure points and perform acupressure&lt;br /&gt;
&lt;br /&gt;
Massage Map 3D is now ready for sale in iPhone App Store.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://itunes.apple.com/ca/app/massage-map-3d/id403086672?mt=8" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_K9J6QU3E7Nk/TOHspCwd_wI/AAAAAAAAAGw/cOL4cx0zm7U/s320/IMG_0066.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-4638452105765972748?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/4638452105765972748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/massage-map-3d-is-ready-for-sale-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/4638452105765972748?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/4638452105765972748?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/massage-map-3d-is-ready-for-sale-in.html' title='Massage Map 3D is ready for sale in iPhone App Store.'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_K9J6QU3E7Nk/TOHspCwd_wI/AAAAAAAAAGw/cOL4cx0zm7U/s72-c/IMG_0066.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DEYEQnY-eyp7ImA9Wx5aF0Q.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-2110940447019381817</id><published>2010-11-14T20:41:00.000-08:00</published><updated>2010-11-14T20:41:43.853-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-14T20:41:43.853-08:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='C runtime'/><title>Problem printing double with printf on iPhone</title><content type='html'>On other platforms, it usually does not matter whether you use %g or %lg to print double with printf, but for iPhone, you have to use %lg.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-2110940447019381817?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/2110940447019381817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/problem-printing-double-with-printf-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/2110940447019381817?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/2110940447019381817?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/problem-printing-double-with-printf-on.html' title='Problem printing double with printf on iPhone'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;A0cGRHo9fSp7ImA9Wx5aFko.&quot;'><id>tag:blogger.com,1999:blog-2512668414584019433.post-4928433588143003173</id><published>2010-11-13T11:58:00.000-08:00</published><updated>2010-11-13T12:10:25.465-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2010-11-13T12:10:25.465-08:00</app:edited><title>sed for iphone</title><content type='html'>Here is a simple sed for iphone using RegexKitLite:&lt;br /&gt;
&lt;br /&gt;
// input - input string&lt;br /&gt;
// search - regex to search&lt;br /&gt;
// replace - string to replace with&lt;br /&gt;
// return value - output string&lt;br /&gt;
&lt;style type="text/css"&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d000a2}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #3a8289}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #e60b00}
span.s1 {color: #d000a2}
span.s2 {color: #000000}
span.s3 {color: #3f00dd}
span.s4 {color: #7e22ac}
span.s5 {color: #490084}
span.s6 {color: #e60b00}
span.s7 {color: #3a8289}
span.s8 {color: #1f5a5f}
span.s9 {color: #814823}
span.Apple-tab-span {white-space:pre}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class="p1"&gt;&lt;span class="s1"&gt;const&lt;/span&gt; &lt;span class="s1"&gt;char&lt;/span&gt;* sed(&lt;span class="s1"&gt;const&lt;/span&gt; &lt;span class="s1"&gt;char&lt;/span&gt;* input, &lt;span class="s1"&gt;const&lt;/span&gt; &lt;span class="s1"&gt;char&lt;/span&gt;* search,&lt;span class="s1"&gt;const&lt;/span&gt; &lt;span class="s1"&gt;char&lt;/span&gt;* replace) {&lt;/div&gt;&lt;div class="p2"&gt;&lt;span class="s2"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;static&lt;span class="s2"&gt; &lt;/span&gt;char&lt;span class="s2"&gt; buf[&lt;/span&gt;&lt;span class="s3"&gt;100000&lt;/span&gt;&lt;span class="s2"&gt;]; &amp;nbsp; // assume the output string length &amp;lt;100000&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="s4"&gt;NSString&lt;/span&gt; *searchString&amp;nbsp; &amp;nbsp; &amp;nbsp; = [&lt;span class="s4"&gt;NSString&lt;/span&gt; &lt;span class="s5"&gt;stringWithFormat&lt;/span&gt;:&lt;span class="s6"&gt;@"%s"&lt;/span&gt;,input];&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="s4"&gt;NSString&lt;/span&gt; *regexString &amp;nbsp; &amp;nbsp; &amp;nbsp; = [&lt;span class="s4"&gt;NSString&lt;/span&gt; &lt;span class="s5"&gt;stringWithFormat&lt;/span&gt;:&lt;span class="s6"&gt;@"%s"&lt;/span&gt;,search];&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="s4"&gt;NSString&lt;/span&gt; *replaceWithString = [&lt;span class="s4"&gt;NSString&lt;/span&gt; &lt;span class="s5"&gt;stringWithFormat&lt;/span&gt;:&lt;span class="s6"&gt;@"%s"&lt;/span&gt;,replace];&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="s2"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="s4"&gt;NSString&lt;/span&gt;&lt;span class="s2"&gt; *&lt;/span&gt;replacedString&lt;span class="s2"&gt;&amp;nbsp; &amp;nbsp; = &lt;/span&gt;&lt;span class="s1"&gt;NULL&lt;/span&gt;&lt;span class="s2"&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="s7"&gt;replacedString&lt;/span&gt; = [searchString &lt;span class="s8"&gt;stringByReplacingOccurrencesOfRegex&lt;/span&gt;:regexString &lt;span class="s8"&gt;withString&lt;/span&gt;:replaceWithString];&lt;/div&gt;&lt;div class="p4"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="p5"&gt;&lt;span class="s2"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="s5"&gt;NSLog&lt;/span&gt;&lt;span class="s2"&gt;(&lt;/span&gt;@"replaced string: '%@'"&lt;span class="s2"&gt;, &lt;/span&gt;&lt;span class="s7"&gt;replacedString&lt;/span&gt;&lt;span class="s2"&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="p3"&gt;&lt;span class="s2"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="s9"&gt;strcpy&lt;/span&gt;&lt;span class="s2"&gt;(buf, [&lt;/span&gt;replacedString&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="s5"&gt;UTF8String&lt;/span&gt;&lt;span class="s2"&gt;]);&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="s1"&gt;return&lt;/span&gt; buf;&lt;/div&gt;&lt;div class="p1"&gt;}&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;sample usage:&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;style type="text/css"&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #490084}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #008b00}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #e60b00}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {color: #000000}
span.s2 {color: #7e22ac}
span.s3 {color: #3a8289}
span.s4 {color: #d000a2}
span.s5 {color: #1f5a5f}
span.s6 {color: #490084}
span.s7 {color: #e60b00}
span.Apple-tab-span {white-space:pre}
&lt;/style&gt;   &lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-tab-span"&gt; &lt;/span&gt;&lt;span class="s4"&gt;char&lt;/span&gt;* buf = &lt;span class="s5"&gt;sed&lt;/span&gt; (str, &lt;span class="s7"&gt;"[ \\t]+"&lt;/span&gt;, &lt;span class="s7"&gt;" "&lt;/span&gt;); // replace multiple white spaces with one space&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // note you need double \\&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;To use it, you need to&amp;nbsp;&lt;/div&gt;&lt;div class="p1"&gt;1. download RegexKitLite&lt;/div&gt;&lt;div class="p1"&gt;2. add RegexKitLite.h and RegexKitLite.m to your Xcode project&lt;/div&gt;&lt;div class="p1"&gt;3. add libcucore.dylib to Frameworks of your Xcode project&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Search the web for RegexKitLite:&lt;br /&gt;
&lt;form action="http://www.google.com/cse" id="cse-search-box"&gt;&lt;input name="cx" type="hidden" value="partner-pub-9208429042312087:5383865637" /&gt;&lt;br /&gt;
&lt;input name="ie" type="hidden" value="UTF-8" /&gt;&lt;br /&gt;
&lt;input name="q" size="55" type="text" value="RegexKitLite" /&gt;&lt;br /&gt;
&lt;input name="sa" type="submit" value="Search" /&gt;&lt;/form&gt;For documentation of regex, see &lt;a href="http://userguide.icu-project.org/strings/regexp"&gt;http://userguide.icu-project.org/strings/regexp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2512668414584019433-4928433588143003173?l=grant-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://grant-tech.blogspot.com/feeds/4928433588143003173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://grant-tech.blogspot.com/2010/11/sed-for-iphone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/4928433588143003173?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2512668414584019433/posts/default/4928433588143003173?v=2'/><link rel='alternate' type='text/html' href='http://grant-tech.blogspot.com/2010/11/sed-for-iphone.html' title='sed for iphone'/><author><name>Sam Liu</name><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='06897146701373568743'/></author><thr:total>0</thr:total></entry></feed>