<?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>あらびき林檎。 &#187; Objective-c</title>
	<atom:link href="http://splitchin.com/tech/tag/objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://splitchin.com/tech</link>
	<description>Macや, iPhoneでの,Webデザイン,アプリ開発などを綴ってます。</description>
	<lastBuildDate>Thu, 02 Feb 2012 10:31:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>NSTimeZone タイムゾーン</title>
		<link>http://splitchin.com/tech/2010/07/29/nstimezone-%e3%82%bf%e3%82%a4%e3%83%a0%e3%82%be%e3%83%bc%e3%83%b3/</link>
		<comments>http://splitchin.com/tech/2010/07/29/nstimezone-%e3%82%bf%e3%82%a4%e3%83%a0%e3%82%be%e3%83%bc%e3%83%b3/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:23:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Object-C]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK 3]]></category>
		<category><![CDATA[iPhone SDK4]]></category>
		<category><![CDATA[GMT]]></category>
		<category><![CDATA[iPhoneアプリ]]></category>
		<category><![CDATA[NSTimeZone]]></category>
		<category><![CDATA[Objective-c]]></category>

		<guid isPermaLink="false">http://splitchin.com/tech/?p=1230</guid>
		<description><![CDATA[				NSTimeZoneのクラスメソッド
				
				timeZoneWithName:・・・タイムゾーン名でタイムゾーンを作って返します
				timeZoneWithAbbreviation:・・・省略形 [...]]]></description>
			<content:encoded><![CDATA[				<h3>NSTimeZoneのクラスメソッド</h3>
				<ul>
				<li>timeZoneWithName:・・・タイムゾーン名でタイムゾーンを作って返します</li>
				<li>timeZoneWithAbbreviation:・・・省略形からタイムゾーンを作って返します</li>
				<li>timeZoneForSecondsFromGMT:・・・グリニッジ標準時からの秒差でタイムゾーンを作って返します</li>
				</ul>
				<p>次のソースで、timeZoneWithNameの、タイムゾーン名を取得できます。</p>
				<pre class="brush: plain;">
#import &lt;CoreFoundation/CoreFoundation.h&gt;

NSString *timeZoneinfo = (NSString *)CFTimeZoneCopyKnownNames();
NSLog(@&quot;timeZoneinfo is %@&quot;, timeZoneinfo);
</pre>
				<p>例えば、</p>
				<ul>
				<li>ニューヨーク・・・“America/New_York”</li>
				<li>上海・・・“Asia/Shanghai”</li>
				<li>東京・・・“Asia/Tokyo”</li>
				<li>ロンドン・・・“Europe/London”</li>
				</ul>
				<p><!-- Amazon area --></p>
				<div class="amazon-area">
				<iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&#038;bc1=FFFFFF&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=333333&#038;lc1=333333&#038;t=i7llcom-22&#038;o=9&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=1X69VDGQCMF7Z30FM082&#038;asins=4863540515" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
				</div>
				<p><!-- /Amazon area --></p>
]]></content:encoded>
			<wfw:commentRss>http://splitchin.com/tech/2010/07/29/nstimezone-%e3%82%bf%e3%82%a4%e3%83%a0%e3%82%be%e3%83%bc%e3%83%b3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>box2d iPhoneアプリ</title>
		<link>http://splitchin.com/tech/2010/07/05/box2d-iphone%e3%82%a2%e3%83%97%e3%83%aa/</link>
		<comments>http://splitchin.com/tech/2010/07/05/box2d-iphone%e3%82%a2%e3%83%97%e3%83%aa/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 15:30:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Object-C]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[iPhoneアプリ]]></category>
		<category><![CDATA[Objective-c]]></category>

		<guid isPermaLink="false">http://splitchin.com/tech/?p=1170</guid>
		<description><![CDATA[				そのまま使える iPhoneアプリプログラム
				
				ActionScriptでは、有名な物理演算ライブラリ「Box2D」のiPhone版をダウンロードした際の履歴です。
				環境は、Mac OSX [...]]]></description>
			<content:encoded><![CDATA[				<p><a href="http://www.amazon.co.jp/gp/product/4839935580?ie=UTF8&#038;tag=i7llcom-22&#038;linkCode=as2&#038;camp=247&#038;creative=7399&#038;creativeASIN=4839935580">そのまま使える iPhoneアプリプログラム</a><img src="http://www.assoc-amazon.jp/e/ir?t=i7llcom-22&#038;l=as2&#038;o=9&#038;a=4839935580" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
				<img src="http://splitchin.com/tech/wp-content/uploads/2010/07/box2d.png" alt="box2d" title="" width="320" height="260" class="alignleft size-full wp-image-1175" /></p>
				<p>ActionScriptでは、有名な物理演算ライブラリ「Box2D」のiPhone版をダウンロードした際の履歴です。<br />
				環境は、Mac OSX10.6.3 / XCode 3.2.3 iPhone OS4 で試しました。</p>
				<p>■SCM Repositories &#8211; box2d<br />
				<a href="http://box2d.svn.sourceforge.net/viewvc/box2d/" target="new">http://box2d.svn.sourceforge.net/viewvc/box2d</a></p>
				<p><a href="http://box2d.svn.sourceforge.net/viewvc/box2d/tags/Box2D-2.0.2/" target="new">http://box2d.svn.sourceforge.net/viewvc/box2d/tags/Box2D-2.0.2/</a><br />
				「Download GNU tarball」からダウンロードします。</p>
				<p>「trunk」「tag」「branch」から、tagのサンプルでないと、そのままビルドすると、ビルドエラーが起きます。</p>
				<p>SDK4にしたので、「ターゲット」の「iPhone OS Deployment Target」を、iPhone4にします。</p>
				<p>Objective-Cでも、Flashのような物理演算ができるのは面白いですね。<br />
				<img src="http://splitchin.com/tech/wp-content/uploads/2010/07/box2dsample.png" alt="" title="" width="200" height="281" class="size-full wp-image-1174" /><br />
				色々なサンプルが試せます。</p>
				<p><!-- Amazon area --></p>
				<div class="amazon-area">
				<iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&#038;bc1=FFFFFF&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=333333&#038;lc1=333333&#038;t=i7llcom-22&#038;o=9&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=1X69VDGQCMF7Z30FM082&#038;asins=4862670857" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
				</div>
				<p><!--/Amazon area --></p>
]]></content:encoded>
			<wfw:commentRss>http://splitchin.com/tech/2010/07/05/box2d-iphone%e3%82%a2%e3%83%97%e3%83%aa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhoneアプリ　UITableViewを試す。</title>
		<link>http://splitchin.com/tech/2010/03/14/iphone%e3%82%a2%e3%83%97%e3%83%aa%e3%80%80uitableview%e3%82%92%e8%a9%a6%e3%81%99%e3%80%82/</link>
		<comments>http://splitchin.com/tech/2010/03/14/iphone%e3%82%a2%e3%83%97%e3%83%aa%e3%80%80uitableview%e3%82%92%e8%a9%a6%e3%81%99%e3%80%82/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 13:18:45 +0000</pubDate>
		<dc:creator>arakkyee</dc:creator>
				<category><![CDATA[Object-C]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK 3]]></category>
		<category><![CDATA[iPhoneアプリ]]></category>
		<category><![CDATA[Objective-c]]></category>
		<category><![CDATA[UITableView]]></category>

		<guid isPermaLink="false">http://splitchin.com/tech/?p=888</guid>
		<description><![CDATA[				「Macを買うなら…」でおなじみの、秋葉館オンラインショップ
				もちろん話題のiPodも本体を含め関連商品充実！ 
				
				色々と大変そうなので、避けていたのですが、
				UITableVie [...]]]></description>
			<content:encoded><![CDATA[				<p>「Macを買うなら…」でおなじみの、<a href="http://px.a8.net/svt/ejp?a8mat=1NLQR5+AV5URM+BEK+5ZEMQ" target="_blank">秋葉館オンラインショップ</a><br />
				もちろん話題のiPodも本体を含め関連商品充実！ <img src="http://www12.a8.net/0.gif?a8mat=1NLQR5+AV5URM+BEK+5ZEMQ" border="0" alt="" width="1" height="1" /><br />
				<img class="alignnone size-full wp-image-889" title="TableView01" src="http://splitchin.com/tech/wp-content/uploads/2010/03/TableView01.png" alt="UITableView" width="200" height="367" /></p>
				<p>色々と大変そうなので、避けていたのですが、</p>
				<p>UITableViewの基礎を試してみました。<br />
				こちらをベースに色々カスタマイズしてみようと思います。</p>
				<ul>
				<li><a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/tableView:cellForRowAtIndexPath:">tableView:cellForRowAtIndexPath:</a> メソッド<br />
				indexPathが指定する位置のUITableViewCellのインスタンスを返すようにする。</li>
				<li><a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UITableViewDataSource/tableView:numberOfRowsInSection:">tableView:numberOfRowsInSection:</a> メソッド<br />
				テーブルが保持するセルの数を返すようにする。</li>
				</ul>
				<p><a href="http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html" target="new">iPhone Dev Center: UITableViewDataSource Protocol Reference</a>より</p>
				<pre class="brush: cpp;">
@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	self.title =@&quot;UITableView　聖域十二宮編&quot;;

	//Tableに表示する要素
	items_ = [[NSArray alloc] initWithObjects:
			 @&quot;１月　山羊座 - Capricornus&quot;, @&quot;２月　水瓶座 - Aquarius&quot;,@&quot;３月　魚座 - Pisces&quot;,
			 @&quot;４月　牡羊座 - Aries&quot;, @&quot;５月　牡牛座 - Taurus&quot;, @&quot;６月　双子座 - Gemini&quot;,
			 @&quot;７月　蟹座 - Cancer&quot;, @&quot;８月　獅子座 - Leo&quot;, @&quot;９月　乙女座 - Virgo&quot;,
			 @&quot;１０月 天秤座 - Libra&quot;, @&quot;１１月　蠍座 - Scorpio&quot;, @&quot;１２月　射手座 - Sagittarius&quot;,
			 nil];
}
&lt;pre&gt;//Viewのリリースに、要素の配列をリリース&lt;/pre&gt;
- (void)viewDidUnload {
 [items_ release];
}

// テーブルが持っているセルの数を返す
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
 return [items_ count];
}

// UiTableViewCellのインスタンスを返す
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

 static NSString *CellIdentifier = @&quot;Cell&quot;;

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
 if (cell == nil) {
 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
 }

 // Configure the cell.

 cell.textLabel.text = [items_ objectAtIndex:indexPath.row];

 return cell;
}
</pre>
				<p><img class="alignnone size-full wp-image-892" src="http://splitchin.com/tech/wp-content/uploads/2010/03/TableView02.png" alt="TableView02" width="200" height="346" /></p>
				<p>セルの選択時にアクションを発生させるには、didSelectedRowAtIndexPathメソッドをオーバライドします。</p>
				<pre class="brush: cpp;">
// セルの選択をハンドリングしてアクションを発生させる
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

	NSString* message = [items_ objectAtIndex:indexPath.row];
	UIAlertView* alert = [[[UIAlertView alloc] init] autorelease];
	alert.message = message;
	[alert addButtonWithTitle:@&quot;OK&quot;];
	[alert show];
}
</pre>
				<p><!-- amazon --></p>
				<p><!-- /Amazon --></p>
]]></content:encoded>
			<wfw:commentRss>http://splitchin.com/tech/2010/03/14/iphone%e3%82%a2%e3%83%97%e3%83%aa%e3%80%80uitableview%e3%82%92%e8%a9%a6%e3%81%99%e3%80%82/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

