<?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>iPhoneという一方通行 &#187; ソースコード</title>
	<atom:link href="http://www.iphonedev.jp/tag/%e3%82%bd%e3%83%bc%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%89/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iphonedev.jp</link>
	<description>新米社長のたまに書くブログ</description>
	<lastBuildDate>Wed, 17 Mar 2010 01:08:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>大秘宝発見！iPhone SDKのサンプル</title>
		<link>http://www.iphonedev.jp/%e5%a4%a7%e7%a7%98%e5%ae%9d%e7%99%ba%e8%a6%8b%ef%bc%81iphone-sdk%e3%81%ae%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab/</link>
		<comments>http://www.iphonedev.jp/%e5%a4%a7%e7%a7%98%e5%ae%9d%e7%99%ba%e8%a6%8b%ef%bc%81iphone-sdk%e3%81%ae%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 01:40:45 +0000</pubDate>
		<dc:creator>R.J.</dc:creator>
				<category><![CDATA[開発]]></category>
		<category><![CDATA[ソースコード]]></category>

		<guid isPermaLink="false">http://www.iphonedev.jp/2008/08/13/%e5%a4%a7%e7%a7%98%e5%ae%9d%e7%99%ba%e8%a6%8b%ef%bc%81iphone-sdk%e3%81%ae%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab/</guid>
		<description><![CDATA[iPhoneのアプリを作りたかったら、まずSDKのサンプルを読むだ！具体的にいくつかののサンプルがリスト]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.iphonedev.jp/wp-content/uploads/2008/08/skitched-20080813-100750.jpg" width="330" height="323" alt="skitched-20080813-100750.png" /></p>
<p>この一週間の勉強＋様々な試行錯誤で、ようやく「俺、入門してきたかなぁ」と思い始めた。だけと、問題調査にかかった時間より、進捗はちょっとかわいそうに見える。開発予定のアプリのブループリントはすでにできたが、その通りにプログラムを作れるまで、調査すべき内容はまだいっぱいのようだ。</p>
<p>英語は読めるだけと、まだ更新中のSDKのドキュメントはちょっと読みづらかった。SDKに付いているソースと内容の説明をもう一度チェックしてみたら、ほら、探しているほぼすべての答えはここにある！</p>
<p>ゲームを作る予定はまだないから、いくつ自分に必要なサンプルをピックアップ。</p>
<ul>
<li>TableViewSuite<br />
  UITableViewのCellをカスタマイズする例です(Shows how to use UITableView through a progression of increasingly advanced applications.)</li>
<li>EditableDetailView<br />
  UITableViewをベースに内容の修正、 保存まで(EditableDetailView shows how to use UITableView&#8217;s APIs for inserting and deleting rows, editable content within table cells, and use of a UITableView to select an option from a predefined list.)</li>
<li>SeismicXML<br />
  XMLの解析(Demonstrates how to use NSXMLParser to parse XML documents.)</li>
<li>PageControl<br />
  UIScrollViewの改ページ機能(This application demonstrates use of UIScrollView&#8217;s paging functionality.)</li>
<li>TableSearch<br />
  UITableViewとUISearchBarの連動(Demonstrates how to search the contents of a UITableView using UISearchBar, effectively filtering in and out the contents of that table.)</li>
<li>ViewTransitions<br />
  動画つきのViewの切り替え(Demonstrates how to perform transitions between two views using built-in Core Animation transitions.)</li>
</ul>
<p>要するに、iPhoneのアプリを作りたかったら、まずSDKのサンプルを読むだ！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphonedev.jp/%e5%a4%a7%e7%a7%98%e5%ae%9d%e7%99%ba%e8%a6%8b%ef%bc%81iphone-sdk%e3%81%ae%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2時間をかかったトラブルシューティングの裏</title>
		<link>http://www.iphonedev.jp/2%e6%99%82%e9%96%93%e3%82%92%e3%81%8b%e3%81%8b%e3%81%a3%e3%81%9f%e3%83%88%e3%83%a9%e3%83%96%e3%83%ab%e3%82%b7%e3%83%a5%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%ae%e8%a3%8f/</link>
		<comments>http://www.iphonedev.jp/2%e6%99%82%e9%96%93%e3%82%92%e3%81%8b%e3%81%8b%e3%81%a3%e3%81%9f%e3%83%88%e3%83%a9%e3%83%96%e3%83%ab%e3%82%b7%e3%83%a5%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%ae%e8%a3%8f/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 00:34:40 +0000</pubDate>
		<dc:creator>R.J.</dc:creator>
				<category><![CDATA[開発]]></category>
		<category><![CDATA[ソースコード]]></category>

		<guid isPermaLink="false">http://www.iphonedev.jp/2008/08/12/2%e6%99%82%e9%96%93%e3%81%8b%e3%81%8b%e3%81%a3%e3%81%9f%e3%83%88%e3%83%a9%e3%83%96%e3%83%ab%e3%82%b7%e3%83%a5%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%ae%e8%a3%8f/</guid>
		<description><![CDATA[２時間をかかったトラブルシューティングはようやく一段落になった。JAVAプログラマーの目で見ると全然おかしくないソースにも関わらず、メモリリークの問題はどうしてもクリアできなかった。元々JAVAやC#みたいなハイレベルOO言語のプログラマーではのミスではないかと思う。]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.iphonedev.jp/wp-content/uploads/2008/08/gadgetit.png" width="420" height="351" alt="GadgetIt — デバッガ.png" /></p>
<p>２時間をかかったトラブルシューティングはようやく一段落になった。JAVAプログラマーの目で見ると全然おかしくないソースにも関わらず、メモリリークの問題はどうしてもクリアできなかった。元々JAVAやC#みたいなハイレベルOO言語のプログラマーではのミスではないかと思う。</p>
<p>一つ目は、数列の定義。いままでNSArrayをArrayListの同等品と考えていましたので、下記のような書き方をしていたのだ。実は、@&#8221;a&#8221;, @&#8221;b&#8221;（=JAVAの&#8221;a&#8221;,&#8221;b&#8221;）のような数列にいれたいオブジェクトの後ろに、終止符みたいにnil(= JAVAのnull)を入れないといかないだ。<br />
<img src="http://www.iphonedev.jp/wp-content/uploads/2008/08/detailviewcontrollerm-gadgetit-2-2.png" width="392" height="30" alt="DetailViewController.m — GadgetIt-2-2.png" /></p>
<p>もう一つは、Objective-Cの特徴であるpropertyの使用方法です。@propertyと@synthesizeの利用で、JavaBeanの面倒なGetとSet方法がこれで自動生成されることになる。retainなどのキーワードを指定すれば、ある程度メモリ管理の手間も省くことになる。</p>
<p>だが、self.propertyName = anObjectとpropertyName = anObjectに、微妙な差があるんだ。</p>
<p>self.propertyNameの場合、[self setPropertyName anObject]と同等なので、@property (retain)を指定すれば、retainをやってくれるのが、 propertyName = anObjectはただの変数のアサインだけだ。下記のソースを見れば分かる。keyNamesがretainされることを前提に、一時変数array（ポインター）のreleaseを行っていた。</p>
<p>keyNames = arrayを書く場合、このメッソドが終わる時点に、keyNamesのメモリが解放されてしまうので、次にkeyNamesをアクセスするところから、エラーが出るだ。</p>
<p><img src="http://www.iphonedev.jp/wp-content/uploads/2008/08/detailviewcontrollerm-gadgetit-4.png" width="442" height="87" alt="DetailViewController.m — GadgetIt-4.png" /><br />
<span style="color: #808080;">※修正後のソース、緑色がついてるのは前述の２点注意です。</span></p>
<p>へたくそな説明を最後まで読んでくれる方はいるかが問題だが、一応メモにもなる。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iphonedev.jp/2%e6%99%82%e9%96%93%e3%82%92%e3%81%8b%e3%81%8b%e3%81%a3%e3%81%9f%e3%83%88%e3%83%a9%e3%83%96%e3%83%ab%e3%82%b7%e3%83%a5%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%ae%e8%a3%8f/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
