<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2japanesefull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Sun Limited Mt.</title>
	
	<link>http://www.syuhari.jp/blog</link>
	<description>I love iPhone, CakePHP and WordPress.</description>
	<lastBuildDate>Thu, 22 Jul 2010 02:13:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/syuhari" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="syuhari" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>[iPhone] MFMailComposeViewController で画像入りの HTML メールを送る</title>
		<link>http://www.syuhari.jp/blog/archives/2184</link>
		<comments>http://www.syuhari.jp/blog/archives/2184#comments</comments>
		<pubDate>Thu, 22 Jul 2010 02:13:40 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[iPhone/iPod touch]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[send]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2184</guid>
		<description><![CDATA[MFMailComposeViewController を使うと簡単にアプリ内から簡単にメール送信することができます。HTML メールも送信することが可能ですが、HTML で img タグを使うときには画像ファイルを Base64 エンコードする必要があります。
NSData+Base64
下記サイトの下の方にある NSData+Base64 のコードをダウンロードしてプロジェクトに追加します。
Cocoa with Love: Base64 encoding options on the Mac and iPhone

img タグを入れた HTML メールを送る
HTML メールを送るには以下のようにします。

NSMutableString* emailBody = [[[NSMutableString alloc] initWithString:@""] retain];
// HTML で本文を作成する
[emailBody appendString:@"太字"];

[emailBody appendString:@""];
MFMailComposeViewController* mailvc = [[MFMailComposeViewController alloc] init];
mailvc.mailComposeDelegate = self;
[mailvc setSubject:@"subject"];
[mailvc setToRecipients:[NSArray arrayWithObject:@"hoge@example.com"]];
[mailvc setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:mailvc animated:YES];
[mailvc release];
[emailBody release];

しかし、img タグはタグを入れただけでは画像を本文内に表示させることはできません。img タグを使用する場合は、以下のように画像データを Base64 でエンコードして入れます。

NSString* path [...]]]></description>
			<content:encoded><![CDATA[<p>MFMailComposeViewController を使うと簡単にアプリ内から簡単にメール送信することができます。HTML メールも送信することが可能ですが、HTML で img タグを使うときには画像ファイルを Base64 エンコードする必要があります。</p>
<h4>NSData+Base64</h4>
<p>下記サイトの下の方にある NSData+Base64 のコードをダウンロードしてプロジェクトに追加します。<br />
<a href="http://cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html" target="_blank" class="liexternal">Cocoa with Love: Base64 encoding options on the Mac and iPhone</a><br />
<span id="more-2184"></span></p>
<h4>img タグを入れた HTML メールを送る</h4>
<p>HTML メールを送るには以下のようにします。</p>
<pre class="cpp" name="code">
NSMutableString* emailBody = [[[NSMutableString alloc] initWithString:@"<html><body>"] retain];
// HTML で本文を作成する
[emailBody appendString:@"<strong>太字</strong>"];

[emailBody appendString:@"</body></html>"];
MFMailComposeViewController* mailvc = [[MFMailComposeViewController alloc] init];
mailvc.mailComposeDelegate = self;
[mailvc setSubject:@"subject"];
[mailvc setToRecipients:[NSArray arrayWithObject:@"hoge@example.com"]];
[mailvc setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:mailvc animated:YES];
[mailvc release];
[emailBody release];
</pre>
<p>しかし、img タグはタグを入れただけでは画像を本文内に表示させることはできません。img タグを使用する場合は、以下のように画像データを Base64 でエンコードして入れます。</p>
<pre class="cpp" name="code">
NSString* path = [[NSBundle mainBundle] pathForResource:@"foo" ofType:@"gif"];
NSData* data = [NSData dataWithContentsOfFile:path];
NSString* base64String = [data base64EncodedString];
[emailBody appendString:[NSString stringWithFormat:@&quot;&lt;img src='data:image/gif;base64,%@'&gt;&quot;, base64String]];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2184/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Objective-C でシングルトンパターン</title>
		<link>http://www.syuhari.jp/blog/archives/2178</link>
		<comments>http://www.syuhari.jp/blog/archives/2178#comments</comments>
		<pubDate>Wed, 14 Jul 2010 06:50:32 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[desing pattern]]></category>
		<category><![CDATA[singleton]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2178</guid>
		<description><![CDATA[Objective-C でシングルトンパターンのクラスを作成するメモです。
シングルトンパターンとは、クラスのインスタンスがひとつしか生成されないことを保証するデザインパターンです。NSUserDefaults などがシングルトンなクラスです。

シングルトンなクラスを作成するときのポイントです。

静的インスタンスを生成して、ひとつだけ作成したインスタンスを入れておく
アップルが推奨しているクラスファクトリーメソッド名（sharedInstance や sharedManager) を使用して、インスタンス未生成時のみインスタンスを生成する
インスタンスがひとつしか生成されないことを保証するために [[Hoge alloc] init] とされた場合の対策をしておく
retain, retainCount, copyWithZone, release, autorelease をオーバライドしてシングルトン状態が保持されるようにする

で、作成したのが以下のようなコードです。これに必要なメソッドなどを適宜追加して使います。インスタンスを生成する処理を @synchronized(){} で囲うことにより同時に複数のスレッドから実行されたときにも、処理が同時に実行されないようにブロックされ、シングルトン状態を保持できます。

#import "History.h"

@implementation History

static History* sharedHistory = nil;

+ (History*)sharedManager {
	@synchronized(self) {
		if (sharedHistory == nil) {
			[[self alloc] init];
		}
	}
	return sharedHistory;
}

+ (id)allocWithZone:(NSZone *)zone {
	@synchronized(self) {
		if (sharedHistory == nil) {
			sharedHistory = [super allocWithZone:zone];
			return sharedHistory;
		}
	}
	return nil;
}

- (id)copyWithZone:(NSZone*)zone {
	return self;  // シングルトン状態を保持するため何もせず self を返す
}

- (id)retain [...]]]></description>
			<content:encoded><![CDATA[<p>Objective-C でシングルトンパターンのクラスを作成するメモです。<br />
シングルトンパターンとは、クラスのインスタンスがひとつしか生成されないことを保証するデザインパターンです。NSUserDefaults などがシングルトンなクラスです。<br />
<span id="more-2178"></span><br />
シングルトンなクラスを作成するときのポイントです。</p>
<ol>
<li>静的インスタンスを生成して、ひとつだけ作成したインスタンスを入れておく</li>
<li>アップルが推奨しているクラスファクトリーメソッド名（sharedInstance や sharedManager) を使用して、インスタンス未生成時のみインスタンスを生成する</li>
<li>インスタンスがひとつしか生成されないことを保証するために [[Hoge alloc] init] とされた場合の対策をしておく</li>
<li>retain, retainCount, copyWithZone, release, autorelease をオーバライドしてシングルトン状態が保持されるようにする</li>
</ol>
<p>で、作成したのが以下のようなコードです。これに必要なメソッドなどを適宜追加して使います。インスタンスを生成する処理を @synchronized(){} で囲うことにより同時に複数のスレッドから実行されたときにも、処理が同時に実行されないようにブロックされ、シングルトン状態を保持できます。</p>
<pre class="cpp" name="code">
#import "History.h"

@implementation History

static History* sharedHistory = nil;

+ (History*)sharedManager {
	@synchronized(self) {
		if (sharedHistory == nil) {
			[[self alloc] init];
		}
	}
	return sharedHistory;
}

+ (id)allocWithZone:(NSZone *)zone {
	@synchronized(self) {
		if (sharedHistory == nil) {
			sharedHistory = [super allocWithZone:zone];
			return sharedHistory;
		}
	}
	return nil;
}

- (id)copyWithZone:(NSZone*)zone {
	return self;  // シングルトン状態を保持するため何もせず self を返す
}

- (id)retain {
	return self;  // シングルトン状態を保持するため何もせず self を返す
}

- (unsigned)retainCount {
	return UINT_MAX;  // 解放できないインスタンスを表すため unsigned int 値の最大値 UINT_MAX を返す
}

- (void)release {
	// シングルトン状態を保持するため何もしない
}

- (id)autorelease {
	return self;  // シングルトン状態を保持するため何もせず self を返す
}

@end
</pre>
<p>実際にインスタンスを取得する際は以下のようになります。</p>
<pre class="cpp" name="code">
History* history = [History sharedManager];
</pre>
<p>参考サイト<br />
<a href="http://developer.apple.com/jp/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_10.html" target="_blank" class="liexternal">Cocoa Fundamentals Guide: シングルトンインスタンスの作成</a></p>
<p>先月も今月もほとんどブログを更新していないかった。反省して更新するようにしたいです。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2178/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2010年6月に読んだ本</title>
		<link>http://www.syuhari.jp/blog/archives/2175</link>
		<comments>http://www.syuhari.jp/blog/archives/2175#comments</comments>
		<pubDate>Sun, 04 Jul 2010 20:46:05 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[本]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2175</guid>
		<description><![CDATA[先月はブログを全然更新していなかった。反省です。
2010年6月に読んだ本は全部で17冊でした。いつもと違って小説が若干多かったです。面白かったのは「告白」です。どこの本屋さんに行っても映画の予告がガンガン流れていますね。この小説は読み始めたら止まらなくなってしまいました。ただ最後まで読んでも誰も救われないのがあれですが。

あと今更ながら「1Q84」を読みました。下のリストだと BOOK2 までしか読んでませんが今月に入って BOOK3 も読了しました。村上春樹は好きでいつも新刊が出るとすぐに読んでいたのですが、1Q84 はなぜかスルーしていました。しかし読めばやはり面白いですね。ジャズの It&#8217;s Only a Paper Moon という曲が BOOK1 のエピグラフに出てきますが、この小説をうまく表現しているなぁと読み終わって改めて思いました。It&#8217;s Only a Paper Moon の &#8220;Without your love, it&#8217;s a honky-tonk parade.&#8221; という歌詞が好きですw



◇ syuhariのバインダー
期間 ： 2010年06月読了数 ： 17 冊





WordPress ポケットリファレンス
アクシー株式会社 , 西本 達也 /  技術評論社 (2010-06-19)
★★★☆☆ 読了日：2010年6月22日
期待していたのと違った。WordPress のインストールと使い方がかなりの部分を占めている。





新書がベスト
小飼 弾 /  ベストセラーズ (2010-06-09)
★★★★☆ 読了日：2010年6月19日
とりあえず紹介されていた新書で読んでいないのを片っぱしから読みたくなった





iPadショック iPhoneが切り拓き、iPadが育てる新しいビジネス
林 信行 /  日経BP社 (2010-05-27)
 [...]]]></description>
			<content:encoded><![CDATA[<p>先月はブログを全然更新していなかった。反省です。<br />
2010年6月に読んだ本は全部で17冊でした。いつもと違って小説が若干多かったです。面白かったのは「<a href="http://www.amazon.co.jp/exec/obidos/ASIN/457551344X/8109-22/ref=nosim" target="_blank" class="liexternal">告白</a>」です。どこの本屋さんに行っても映画の予告がガンガン流れていますね。この小説は読み始めたら止まらなくなってしまいました。ただ最後まで読んでも誰も救われないのがあれですが。<br />
<span id="more-2175"></span><br />
あと今更ながら「<a href="http://www.amazon.co.jp/exec/obidos/ASIN/4103534222/8109-22/ref=nosim" target="_blank" class="liexternal">1Q84</a>」を読みました。下のリストだと BOOK2 までしか読んでませんが今月に入って BOOK3 も読了しました。村上春樹は好きでいつも新刊が出るとすぐに読んでいたのですが、1Q84 はなぜかスルーしていました。しかし読めばやはり面白いですね。ジャズの It&#8217;s Only a Paper Moon という曲が BOOK1 のエピグラフに出てきますが、この小説をうまく表現しているなぁと読み終わって改めて思いました。It&#8217;s Only a Paper Moon の &#8220;Without your love, it&#8217;s a honky-tonk parade.&#8221; という歌詞が好きですw</p>
<table border="0" cellpadding="0" cellspacing="0" style="text-align:left;margin:0px 10px">
<tr>
<td colspan="2" style="border-bottom:1px solid #666666;line-height:140%">
<div style="font-size:16px;">◇ <a href="http://mediamarker.net/u/syuhari/" target="_blank" class="liexternal">syuhariのバインダー</a></div>
<div style="padding:10px;line-height:150%;">期間 ： 2010年06月<br />読了数 ： 17 冊</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/477414276X/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51VLXGvu-oL._SL75_.jpg" alt="WordPress ポケットリファレンス" title="WordPress ポケットリファレンス" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/477414276X/8109-22/ref=nosim" target="_blank" class="liexternal">WordPress ポケットリファレンス</a></div>
<div style="padding:0px 3px;">アクシー株式会社 , 西本 達也 /  技術評論社 (2010-06-19)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★☆☆</span> 読了日：2010年6月22日</div>
<div style="padding:0px 3px;">期待していたのと違った。WordPress のインストールと使い方がかなりの部分を占めている。</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4584122849/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41J%2BHDCLYhL._SL75_.jpg" alt="新書がベスト" title="新書がベスト" width="46" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4584122849/8109-22/ref=nosim" target="_blank" class="liexternal">新書がベスト</a></div>
<div style="padding:0px 3px;">小飼 弾 /  ベストセラーズ (2010-06-09)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★☆</span> 読了日：2010年6月19日</div>
<div style="padding:0px 3px;">とりあえず紹介されていた新書で読んでいないのを片っぱしから読みたくなった</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4822248127/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51rcQ7uazAL._SL75_.jpg" alt="iPadショック iPhoneが切り拓き、iPadが育てる新しいビジネス" title="iPadショック iPhoneが切り拓き、iPadが育てる新しいビジネス" width="51" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4822248127/8109-22/ref=nosim" target="_blank" class="liexternal">iPadショック iPhoneが切り拓き、iPadが育てる新しいビジネス</a></div>
<div style="padding:0px 3px;">林 信行 /  日経BP社 (2010-05-27)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月21日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4098250837/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41cx2PbEMZL._SL75_.jpg" alt="英語多読法 (小学館101新書)" title="英語多読法 (小学館101新書)" width="49" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4098250837/8109-22/ref=nosim" target="_blank" class="liexternal">英語多読法 (小学館101新書)</a></div>
<div style="padding:0px 3px;">古川 昭夫 /  小学館 (2010-06-01)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月21日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4492043691/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51aw%2BRY3LKL._SL75_.jpg" alt="会計HACKS!" title="会計HACKS!" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4492043691/8109-22/ref=nosim" target="_blank" class="liexternal">会計HACKS!</a></div>
<div style="padding:0px 3px;">小山 龍介 , 山田 真哉 /  東洋経済新報社 (2010-04-16)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月15日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4103534230/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41shjjawEPL._SL75_.jpg" alt="1Q84 BOOK 2" title="1Q84 BOOK 2" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4103534230/8109-22/ref=nosim" target="_blank" class="liexternal">1Q84 BOOK 2</a></div>
<div style="padding:0px 3px;">村上 春樹 /  新潮社 (2009-05-29)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月27日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/477831154X/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41bQNgkJOsL._SL75_.jpg" alt="「新しい郊外」の家 (RELAX REAL ESTATE LIBRARY)" title="「新しい郊外」の家 (RELAX REAL ESTATE LIBRARY)" width="55" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/477831154X/8109-22/ref=nosim" target="_blank" class="liexternal">「新しい郊外」の家 (RELAX REAL ESTATE LIBRARY)</a></div>
<div style="padding:0px 3px;">馬場正尊 /  太田出版 (2009-01-14)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★☆</span> 読了日：2010年6月18日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4103534222/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41wyR3LA5GL._SL75_.jpg" alt="1Q84 BOOK 1" title="1Q84 BOOK 1" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4103534222/8109-22/ref=nosim" target="_blank" class="liexternal">1Q84 BOOK 1</a></div>
<div style="padding:0px 3px;">村上 春樹 /  新潮社 (2009-05-29)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月13日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4153200115/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41uuWhm0XdL._SL75_.jpg" alt="小さなチーム、大きな仕事―37シグナルズ成功の法則 (ハヤカワ新書juice)" title="小さなチーム、大きな仕事―37シグナルズ成功の法則 (ハヤカワ新書juice)" width="49" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4153200115/8109-22/ref=nosim" target="_blank" class="liexternal">小さなチーム、大きな仕事―37シグナルズ成功の法則 (ハヤカワ新書juice)</a></div>
<div style="padding:0px 3px;">ジェイソン フリード , デイヴィッド・ハイネマイヤー ハンソン /  早川書房 (2010-02-25)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月13日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4047315060/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41Fg1NyUEsL._SL75_.jpg" alt="マラソンは毎日走っても完走できない―「ゆっくり」「速く」「長く」で目指す42.195キロ" title="マラソンは毎日走っても完走できない―「ゆっくり」「速く」「長く」で目指す42.195キロ" width="45" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4047315060/8109-22/ref=nosim" target="_blank" class="liexternal">マラソンは毎日走っても完走できない―「ゆっくり」「速く」「長く」で目指す42.195キロ</a></div>
<div style="padding:0px 3px;">小出 義雄 /  角川SSコミュニケーションズ (2009-11)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月7日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4479792899/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51hWRhqsbcL._SL75_.jpg" alt="ゆるい生き方 ~縛られず、ストレスフリーな毎日のヒント~" title="ゆるい生き方 ~縛られず、ストレスフリーな毎日のヒント~" width="48" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4479792899/8109-22/ref=nosim" target="_blank" class="liexternal">ゆるい生き方 ~縛られず、ストレスフリーな毎日のヒント~</a></div>
<div style="padding:0px 3px;">本田 直之 /  大和書房 (2010-05-22)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★☆</span> 読了日：2010年6月3日</div>
<div style="padding:0px 3px;">ゆるく生きたいね</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/457551344X/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41k4CmwKEcL._SL75_.jpg" alt="告白" title="告白" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/457551344X/8109-22/ref=nosim" target="_blank" class="liexternal">告白</a></div>
<div style="padding:0px 3px;">湊 かなえ /  双葉社 (2010-04-08)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★★</span> 読了日：2010年6月7日</div>
<div style="padding:0px 3px;">誰も救われないが読後感はそれほど悪くない感じ</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4844370774/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51LpMvcdGML._SL75_.jpg" alt="まずは1人で独立・起業!うまくいく人、いかない人" title="まずは1人で独立・起業!うまくいく人、いかない人" width="50" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4844370774/8109-22/ref=nosim" target="_blank" class="liexternal">まずは1人で独立・起業!うまくいく人、いかない人</a></div>
<div style="padding:0px 3px;">鏡味 義房 /  クロスメディア・パブリッシング(インプレス) (2009-10-13)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★☆☆</span> 読了日：2010年6月2日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4334035582/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/318QabqEz-L._SL75_.jpg" alt="ヤフー・トピックスの作り方 (光文社新書 454)" title="ヤフー・トピックスの作り方 (光文社新書 454)" width="45" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4334035582/8109-22/ref=nosim" target="_blank" class="liexternal">ヤフー・トピックスの作り方 (光文社新書 454)</a></div>
<div style="padding:0px 3px;">奥村倫弘 /  光文社 (2010-04-16)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月6日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/479736016X/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41Xdi2oYmSL._SL75_.jpg" alt="USTREAM 世界を変えるネット生中継" title="USTREAM 世界を変えるネット生中継" width="46" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/479736016X/8109-22/ref=nosim" target="_blank" class="liexternal">USTREAM 世界を変えるネット生中継</a></div>
<div style="padding:0px 3px;">川井 拓也 /  ソフトバンククリエイティブ (2010-05-19)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月7日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4061851306/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/61X9KNEKF5L._SL75_.jpg" alt="眠りの森" title="眠りの森" width="54" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4061851306/8109-22/ref=nosim" target="_blank" class="liexternal">眠りの森</a></div>
<div style="padding:0px 3px;">東野 圭吾 /  講談社 (1992-04-03)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月12日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4862485707/8109-22/ref=nosim" target="_blank"><img src="http://ecx.images-amazon.com/images/I/61RiflQMKBL._SL75_.jpg" alt="電子書籍ビジネスの基本からカラクリまでわかる本【小飼弾・池田信夫対談付き】" title="電子書籍ビジネスの基本からカラクリまでわかる本【小飼弾・池田信夫対談付き】" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4862485707/8109-22/ref=nosim" target="_blank" class="liexternal">電子書籍ビジネスの基本からカラクリまでわかる本【小飼弾・池田信夫対談付き】</a></div>
<div style="padding:0px 3px;"> 洋泉社 (2010-05-26)</div>
<div style="padding:0px 3px;"> 読了日：2010年6月4日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2175/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>2010年5月に読んだ本</title>
		<link>http://www.syuhari.jp/blog/archives/2172</link>
		<comments>http://www.syuhari.jp/blog/archives/2172#comments</comments>
		<pubDate>Thu, 03 Jun 2010 01:14:17 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[本]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2172</guid>
		<description><![CDATA[2010年5月に読んだ本は全部で23冊。雑誌とか多いので、もう少し読みたかったです。英語で Twitter につぶやく系の本を2冊ほど読みました。楽しみながら英会話に触れられるのでいいかもしれません。




◇ syuhariのバインダー
期間 ： 2010年05月読了数 ： 23 冊





英語は絶対、勉強するな!―学校行かない・お金かけない・だけどペラペラ
鄭 讃容 /  サンマーク出版 (2001-01)
 読了日：2010年5月30日






facebook
ベン・メズリック /  青志社 (2010-04-06)
 読了日：2010年5月27日






やりたいことは全部やれ! (講談社文庫)
大前 研一 /  講談社 (2005-05-13)
 読了日：2010年5月27日






つみきのいえ
平田 研也 /  白泉社 (2008-10)
 読了日：2010年5月26日






プレゼンテーション Zen
Garr Reynolds , ガー・レイノルズ /  ピアソンエデュケーション (2009-09-07)
★★★★☆ 読了日：2010年5月24日






C01 地球の歩き方 ハワイI 2009~2010
地球の歩き方編集室 /  ダイヤモンド社 (2009-05-16)
 読了日：2010年5月23日






卒業 ―雪月花殺人ゲーム
東野 圭吾 /  講談社 [...]]]></description>
			<content:encoded><![CDATA[<p>2010年5月に読んだ本は全部で23冊。雑誌とか多いので、もう少し読みたかったです。英語で Twitter につぶやく系の本を2冊ほど読みました。楽しみながら英会話に触れられるのでいいかもしれません。<br />
<span id="more-2172"></span></p>
<table border="0" cellpadding="0" cellspacing="0" style="text-align:left;margin:0px 10px">
<tr>
<td colspan="2" style="border-bottom:1px solid #666666;line-height:140%">
<div style="font-size:16px;">◇ <a href="http://mediamarker.net/u/syuhari/" target="_blank" class="liexternal">syuhariのバインダー</a></div>
<div style="padding:10px;line-height:150%;">期間 ： 2010年05月<br />読了数 ： 23 冊</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4763193384" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41PZC4T9FML._SL75_.jpg" alt="英語は絶対、勉強するな!―学校行かない・お金かけない・だけどペラペラ" title="英語は絶対、勉強するな!―学校行かない・お金かけない・だけどペラペラ" width="51" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4763193384" target="_blank" class="liexternal">英語は絶対、勉強するな!―学校行かない・お金かけない・だけどペラペラ</a></div>
<div style="padding:0px 3px;">鄭 讃容 /  サンマーク出版 (2001-01)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月30日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4903853853" target="_blank"><img src="http://ecx.images-amazon.com/images/I/411YI49u7NL._SL75_.jpg" alt="facebook" title="facebook" width="51" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4903853853" target="_blank" class="liexternal">facebook</a></div>
<div style="padding:0px 3px;">ベン・メズリック /  青志社 (2010-04-06)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月27日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4062750708" target="_blank"><img src="http://ecx.images-amazon.com/images/I/5102TEBBDGL._SL75_.jpg" alt="やりたいことは全部やれ! (講談社文庫)" title="やりたいことは全部やれ! (講談社文庫)" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4062750708" target="_blank" class="liexternal">やりたいことは全部やれ! (講談社文庫)</a></div>
<div style="padding:0px 3px;">大前 研一 /  講談社 (2005-05-13)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月27日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4592761316" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41XFsGhP4XL._SL75_.jpg" alt="つみきのいえ" title="つみきのいえ" width="57" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4592761316" target="_blank" class="liexternal">つみきのいえ</a></div>
<div style="padding:0px 3px;">平田 研也 /  白泉社 (2008-10)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月26日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4894713284" target="_blank"><img src="http://ecx.images-amazon.com/images/I/413z-nHOErL._SL75_.jpg" alt="プレゼンテーション Zen" title="プレゼンテーション Zen" width="56" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4894713284" target="_blank" class="liexternal">プレゼンテーション Zen</a></div>
<div style="padding:0px 3px;">Garr Reynolds , ガー・レイノルズ /  ピアソンエデュケーション (2009-09-07)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★☆</span> 読了日：2010年5月24日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4478056943" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51Q6TP0-EsL._SL75_.jpg" alt="C01 地球の歩き方 ハワイI 2009~2010" title="C01 地球の歩き方 ハワイI 2009~2010" width="48" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4478056943" target="_blank" class="liexternal">C01 地球の歩き方 ハワイI 2009~2010</a></div>
<div style="padding:0px 3px;">地球の歩き方編集室 /  ダイヤモンド社 (2009-05-16)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月23日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4061844407" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51CHUk77hlL._SL75_.jpg" alt="卒業 ―雪月花殺人ゲーム" title="卒業 ―雪月花殺人ゲーム" width="53" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4061844407" target="_blank" class="liexternal">卒業 ―雪月花殺人ゲーム</a></div>
<div style="padding:0px 3px;">東野 圭吾 /  講談社 (1989-05-08)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★☆☆</span> 読了日：2010年5月23日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4862670849" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51lC0vq3ibL._SL75_.jpg" alt="Twitter API プログラミング" title="Twitter API プログラミング" width="53" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4862670849" target="_blank" class="liexternal">Twitter API プログラミング</a></div>
<div style="padding:0px 3px;">辻村 浩 /  ワークスコーポレーション (2010-04-21)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月19日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4166607499" target="_blank"><img src="http://ecx.images-amazon.com/images/I/31cyhuVp9vL._SL75_.jpg" alt="イチロー・インタヴューズ" title="イチロー・インタヴューズ" width="47" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4166607499" target="_blank" class="liexternal">イチロー・インタヴューズ</a></div>
<div style="padding:0px 3px;">石田 雄太 /  文藝春秋 (2010-04)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月19日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4797355557" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51zpCr1J-zL._SL75_.jpg" alt="みんなが知りたい空港の疑問50 滑走路とふつうの道路の違いは? 大量の荷物はどう運ばれるの? (サイエンス・アイ新書)" title="みんなが知りたい空港の疑問50 滑走路とふつうの道路の違いは? 大量の荷物はどう運ばれるの? (サイエンス・アイ新書)" width="49" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4797355557" target="_blank" class="liexternal">みんなが知りたい空港の疑問50 滑走路とふつうの道路の違いは? 大量の荷物はどう運ばれるの? (サイエンス・アイ新書)</a></div>
<div style="padding:0px 3px;">秋本 俊二 /  ソフトバンククリエイティブ (2009-12-17)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月16日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4478057443" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51PZunpW91L._SL75_.jpg" alt="B04 地球の歩き方 サンフランシスコ 2009~2010" title="B04 地球の歩き方 サンフランシスコ 2009~2010" width="48" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4478057443" target="_blank" class="liexternal">B04 地球の歩き方 サンフランシスコ 2009~2010</a></div>
<div style="padding:0px 3px;">地球の歩き方編集室 /  ダイヤモンド社 (2009-09-19)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月16日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=B003JIMTV8" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51FaiNye-PL._SL75_.jpg" alt="Androidベストアプリ 2010年 06月号 [雑誌]" title="Androidベストアプリ 2010年 06月号 [雑誌]" width="54" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=B003JIMTV8" target="_blank" class="liexternal">Androidベストアプリ 2010年 06月号 [雑誌]</a></div>
<div style="padding:0px 3px;"> 晋遊舎 (2010-05-11)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月16日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=B003H825X2" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51TwpewG69L._SL75_.jpg" alt="週刊 ダイヤモンド 2010年 5/15号 [雑誌]" title="週刊 ダイヤモンド 2010年 5/15号 [雑誌]" width="56" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=B003H825X2" target="_blank" class="liexternal">週刊 ダイヤモンド 2010年 5/15号 [雑誌]</a></div>
<div style="padding:0px 3px;"> ダイヤモンド社 (2010-05-10)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月16日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4140883200" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41wtvL4C4xL._SL75_.jpg" alt="Twitterで英語をつぶやいてみる (生活人新書)" title="Twitterで英語をつぶやいてみる (生活人新書)" width="49" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4140883200" target="_blank" class="liexternal">Twitterで英語をつぶやいてみる (生活人新書)</a></div>
<div style="padding:0px 3px;">石原真弓 /  日本放送出版協会 (2010-05-07)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★★</span> 読了日：2010年5月15日</div>
<div style="padding:0px 3px;">#twinglish でつぶやいていると作者の方が気軽にリプライくれたりするのがうれしいですね</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4408108456" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51mNHUT3gLL._SL75_.jpg" alt="Twitter英語術" title="Twitter英語術" width="49" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4408108456" target="_blank" class="liexternal">Twitter英語術</a></div>
<div style="padding:0px 3px;">晴山 陽一 , クリストファー・ベルトン /  実業之日本社 (2010-04-27)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★☆☆</span> 読了日：2010年5月12日</div>
<div style="padding:0px 3px;">6/7から twitter で続きが始まる</div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=B003H825VO" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51eBcsL-2iL._SL75_.jpg" alt="Mac Fan (マックファン) 2010年 06月号 [雑誌]" title="Mac Fan (マックファン) 2010年 06月号 [雑誌]" width="56" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=B003H825VO" target="_blank" class="liexternal">Mac Fan (マックファン) 2010年 06月号 [雑誌]</a></div>
<div style="padding:0px 3px;"> 毎日コミュニケーションズ (2010-04-27)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月12日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=490385387X" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41yIHTHIUFL._SL75_.jpg" alt="稼げる 超ソーシャルフィルタリング" title="稼げる 超ソーシャルフィルタリング" width="48" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=490385387X" target="_blank" class="liexternal">稼げる 超ソーシャルフィルタリング</a></div>
<div style="padding:0px 3px;">堀江貴文 /  青志社 (2010-04-21)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★☆☆</span> 読了日：2010年5月8日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4047265721" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51DS4Oku39L._SL75_.jpg" alt="ファミ通iPhone―初心者にも、流行りで買っちゃった人にも、めんどくさくない解説本 (エンターブレインムック)" title="ファミ通iPhone―初心者にも、流行りで買っちゃった人にも、めんどくさくない解説本 (エンターブレインムック)" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4047265721" target="_blank" class="liexternal">ファミ通iPhone―初心者にも、流行りで買っちゃった人にも、めんどくさくない解説本 (エンターブレインムック)</a></div>
<div style="padding:0px 3px;"> エンターブレイン (2010-04)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月8日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4990517008" target="_blank"><img src="http://ecx.images-amazon.com/images/I/511HllFQP3L._SL75_.jpg" alt="はじめまして。iPhone〜携帯電話から乗換えた人へのスタイル案内〜" title="はじめまして。iPhone〜携帯電話から乗換えた人へのスタイル案内〜" width="53" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4990517008" target="_blank" class="liexternal">はじめまして。iPhone〜携帯電話から乗換えた人へのスタイル案内〜</a></div>
<div style="padding:0px 3px;">(株)都恋堂 /  都恋堂 (2010-04-15)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月8日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4774142107" target="_blank"><img src="http://ecx.images-amazon.com/images/I/61dZV9GAN6L._SL75_.jpg" alt="WEB+DB PRESS Vol.56" title="WEB+DB PRESS Vol.56" width="53" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4774142107" target="_blank" class="liexternal">WEB+DB PRESS Vol.56</a></div>
<div style="padding:0px 3px;">WEB+DB PRESS編集部 /  技術評論社 (2010-04-24)</div>
<div style="padding:0px 3px;"> 読了日：2010年5月6日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4887598084" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41f9-6kRHbL._SL75_.jpg" alt="電子書籍の衝撃" title="電子書籍の衝撃" width="47" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4887598084" target="_blank" class="liexternal">電子書籍の衝撃</a></div>
<div style="padding:0px 3px;">佐々木 俊尚 /  ディスカヴァー・トゥエンティワン (2010-04-15)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★☆</span> 読了日：2010年5月6日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4822264114" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51ZMD2e66dL._SL75_.jpg" alt="星野リゾートの教科書 顧客満足度を高める理論と実践" title="星野リゾートの教科書 顧客満足度を高める理論と実践" width="50" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4822264114" target="_blank" class="liexternal">星野リゾートの教科書 顧客満足度を高める理論と実践</a></div>
<div style="padding:0px 3px;">中沢 康彦 /  日経BP出版センター (2010-04-15)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★☆</span> 読了日：2010年5月6日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
<tr>
<td style="width:90px;text-align:center;vertical-align:top;padding:8px 0px;border-bottom:1px solid #DDDDDD;"><a href="http://mediamarker.net/u/syuhari/?asin=4757217528" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41774jPaoBL._SL75_.jpg" alt="iPhoneとツイッターは、なぜ成功したのか?" title="iPhoneとツイッターは、なぜ成功したのか?" width="52" height="75" border="0" /></a></td>
<td style="line-height:130%;text-align:left;vertical-align:top;padding:8px 10px 8px 0px;border-bottom:1px solid #DDDDDD;">
<div><a href="http://mediamarker.net/u/syuhari/?asin=4757217528" target="_blank" class="liexternal">iPhoneとツイッターは、なぜ成功したのか?</a></div>
<div style="padding:0px 3px;">林 信行 /  アスペクト (2010-04-26)</div>
<div style="padding:0px 3px;"><span style="color:#F55C0A">★★★★★</span> 読了日：2010年5月4日</div>
<div style="padding:0px 3px;"></div>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2172/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordCamp Yokohama で LT させて頂きました</title>
		<link>http://www.syuhari.jp/blog/archives/2169</link>
		<comments>http://www.syuhari.jp/blog/archives/2169#comments</comments>
		<pubDate>Mon, 31 May 2010 02:06:50 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[LT]]></category>
		<category><![CDATA[WordCamp]]></category>
		<category><![CDATA[Yokohama]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2169</guid>
		<description><![CDATA[先日の 5/29 に WordCamp Yokohama で LT をさせて頂きました。
ご聴講頂いた皆様、ありがとうございました。Ustream でも配信されていたのでそちらでご視聴頂いた皆様もありがとうございました。
また、スタッフの皆様、本当にありがとうございました &#038; お疲れ様でした！
発表時の資料をアップしました。ご参考までに。

WordPress 開発事例紹介
View more presentations from Akihiro Matsuura.

]]></description>
			<content:encoded><![CDATA[<p>先日の 5/29 に WordCamp Yokohama で LT をさせて頂きました。<br />
ご聴講頂いた皆様、ありがとうございました。Ustream でも配信されていたのでそちらでご視聴頂いた皆様もありがとうございました。</p>
<p>また、スタッフの皆様、本当にありがとうございました &#038; お疲れ様でした！</p>
<p>発表時の資料をアップしました。ご参考までに。<br />
<span id="more-2169"></span></p>
<div style="width:425px" id="__ss_4357752"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/syuhari/wordpress-4357752" title="WordPress 開発事例紹介" target="_blank" class="liexternal">WordPress 開発事例紹介</a></strong><object id="__sse4357752" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wordcamplt-100530205941-phpapp01&#038;stripped_title=wordpress-4357752" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4357752" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wordcamplt-100530205941-phpapp01&#038;stripped_title=wordpress-4357752" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/" target="_blank" class="liexternal">presentations</a> from <a href="http://www.slideshare.net/syuhari" target="_blank" class="liexternal">Akihiro Matsuura</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2169/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[iPhone] Localized 時の小技</title>
		<link>http://www.syuhari.jp/blog/archives/2159</link>
		<comments>http://www.syuhari.jp/blog/archives/2159#comments</comments>
		<pubDate>Fri, 21 May 2010 01:14:23 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[iPhone/iPod touch]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Localizable.string]]></category>
		<category><![CDATA[Localized]]></category>
		<category><![CDATA[NSLog]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2159</guid>
		<description><![CDATA[NSLog の文字列フォーマットは C言語の printf と同じです。この文字列フォーマットには引数を文字列内に入れる順番を指定することができます。

NSLog(@"%@, %@, %@", @"one", @"two", @"three");

上記の実行結果は &#8220;one, two, three&#8221; です。
次に下記のように実行すると


NSLog(@"%3$@, %2$@, %1$@, %2$@", @"one", @"two", @"three");

実行結果は &#8220;three, two, one, two&#8221; となります。&#8221;n$&#8221; と指定することにより、何番目の引数を入れるかを指定することができます。また同じ引数を何度でも指定することができます。
まあ、実際に NSLog ではこんな使い方をすることはないと思います。
しかし、これを知っておくと動的に出力する文字列をローカライズするときに役立ちます。
例えば、次のような日本語を出力したいとします。
（あまりいい例文が思いつかなかったw）

「太郎は2010年5月20日に花子と会った」

英語にローカライズすると

&#8220;Taro met hanako on May 20, 2010.&#8221;

この文章の中で「太郎」「花子」「2010年5月20日」が動的に変わるとすると困るのが語順が違うことです。
この時こそ、先程の文字列フォーマットの順番指定が聞いてきます。
.strings に下記のように指定してします。

"HogeFormat" = @"%1$@は%3$@に%2$@と会った";
"HogeFormat" = @"%1$@ met %2$@ on %3$@.";

実際に出力する際は語順を気にせずに全ての言語で同じ語順で指定すれば正しく出力されます。

format = NSLocalizedString(@"HogeFormat", nil);
formattedString = [NSString stringWithFormat:format, name, name2, date];

もちろん、日付のローカライズはその前に必要です。日付のローカライズに関しては下記エントリもご参照ください。
[iPhone] 日付をローカライズして表示する &#124; Sun [...]]]></description>
			<content:encoded><![CDATA[<p>NSLog の文字列フォーマットは C言語の printf と同じです。この文字列フォーマットには引数を文字列内に入れる順番を指定することができます。</p>
<pre class="cpp" name="code">
NSLog(@"%@, %@, %@", @"one", @"two", @"three");
</pre>
<p>上記の実行結果は &#8220;one, two, three&#8221; です。<br />
次に下記のように実行すると<br />
<span id="more-2159"></span></p>
<pre class="cpp" name="code">
NSLog(@"%3$@, %2$@, %1$@, %2$@", @"one", @"two", @"three");
</pre>
<p>実行結果は &#8220;three, two, one, two&#8221; となります。&#8221;<strong>n$</strong>&#8221; と指定することにより、何番目の引数を入れるかを指定することができます。また同じ引数を何度でも指定することができます。</p>
<p>まあ、実際に NSLog ではこんな使い方をすることはないと思います。<br />
しかし、これを知っておくと動的に出力する文字列をローカライズするときに役立ちます。</p>
<p>例えば、次のような日本語を出力したいとします。<br />
（あまりいい例文が思いつかなかったw）</p>
<ul>
<li>「太郎は2010年5月20日に花子と会った」</li>
</ul>
<p>英語にローカライズすると</p>
<ul>
<li>&#8220;Taro met hanako on May 20, 2010.&#8221;</li>
</ul>
<p>この文章の中で「太郎」「花子」「2010年5月20日」が動的に変わるとすると困るのが語順が違うことです。<br />
この時こそ、先程の文字列フォーマットの順番指定が聞いてきます。</p>
<p>.strings に下記のように指定してします。</p>
<pre class="cpp" name="code">
"HogeFormat" = @"%1$@は%3$@に%2$@と会った";
"HogeFormat" = @"%1$@ met %2$@ on %3$@.";
</pre>
<p>実際に出力する際は語順を気にせずに全ての言語で同じ語順で指定すれば正しく出力されます。</p>
<pre class="cpp" name="code">
format = NSLocalizedString(@"HogeFormat", nil);
formattedString = [NSString stringWithFormat:format, name, name2, date];
</pre>
<p>もちろん、日付のローカライズはその前に必要です。日付のローカライズに関しては下記エントリもご参照ください。<br />
<a href="http://www.syuhari.jp/blog/archives/1248" class="liinternal">[iPhone] 日付をローカライズして表示する | Sun Limited Mt.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2159/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>[iPhone] UIWebView の表示内容をキャプチャして UIImage を生成する</title>
		<link>http://www.syuhari.jp/blog/archives/2145</link>
		<comments>http://www.syuhari.jp/blog/archives/2145#comments</comments>
		<pubDate>Fri, 21 May 2010 00:42:04 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[iPhone/iPod touch]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[rendering]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[UIWebView]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2145</guid>
		<description><![CDATA[UIWebView の表示内容を UIImage にして、表示する方法です。UIWebView を表示させずに、指定した URL のページ内容をレンダリングして UIImage を生成して、UIImageViw に表示します。スクリーンショットだけを取りたいときに使えます。
UIWebView はインスタンスを生成しただけでは、URL をロードしてもレンダリングされません。レンダリングするには UIWindow 内になければダメです。そのために実際には表示しない UIWindow を作成して、その中に addSubview します。

UIWebView のデリゲートメソッド webViewDidFinishLoad: でロード終了の通知を受けてから、UIWebView のレイヤーの内容を UIImage に書きだします。

- (void)viewDidLoad {
  [super viewDidLoad];

  // 表示する UIImageView を生成
  self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(60, 90, 200, 300)];
  [self.view addSubview:imageView];

  // UIWebView 用の表示しない UIWindow を生成
  self.offscreenWindow = [...]]]></description>
			<content:encoded><![CDATA[<p>UIWebView の表示内容を UIImage にして、表示する方法です。UIWebView を表示させずに、指定した URL のページ内容をレンダリングして UIImage を生成して、UIImageViw に表示します。スクリーンショットだけを取りたいときに使えます。</p>
<p>UIWebView はインスタンスを生成しただけでは、URL をロードしてもレンダリングされません。レンダリングするには UIWindow 内になければダメです。そのために実際には表示しない UIWindow を作成して、その中に addSubview します。<br />
<span id="more-2145"></span><br />
UIWebView のデリゲートメソッド webViewDidFinishLoad: でロード終了の通知を受けてから、UIWebView のレイヤーの内容を UIImage に書きだします。</p>
<pre class="cpp" name="code">
- (void)viewDidLoad {
  [super viewDidLoad];

  // 表示する UIImageView を生成
  self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(60, 90, 200, 300)];
  [self.view addSubview:imageView];

  // UIWebView 用の表示しない UIWindow を生成
  self.offscreenWindow = [[UIWindow alloc] initWithFrame:self.view.bounds];

  // UIWebView を表示しない UIWindow に生成
  NSURL* url = [NSURL URLWithString:@"http://www.yahoo.co.jp/"];
  self.webView = [[[UIWebView alloc] initWithFrame:imageView.bounds] autorelease];
  webView.delegate = self;
  webView.scalesPageToFit = YES;
  [offscreenWindow addSubview:webView];
  [webView loadRequest:[NSURLRequest requestWithURL:url]];
  isRendering = YES;
}

- (void) webViewDidFinishLoad:(UIWebView *)webView {
  if (isRendering) {
    isRendering = NO;
    // UIWebView の描画は別スレッドで行われ、
    // 描画完了前にこのメソッドが呼ばれるので
    // UIImage への描画処理は遅らせて実行する
    [self performSelector:@selector(renderWebContent) withObject:nil afterDelay:1.0];
  }
}

- (void) renderWebContent {
  UIGraphicsBeginImageContext(imageView.bounds.size);
  [webView.layer renderInContext:UIGraphicsGetCurrentContext()];
  imageView.image = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();
  [webView removeFromSuperview];
  webView.delegate = nil;
}
</pre>
<p>実行結果は以下のようになります。<br />
<a href="http://www.syuhari.jp/blog/wp-content/uploads/2010/05/スクリーンショット（2010-05-20-5-20木-13.24.26）.png" ><img src="http://www.syuhari.jp/blog/wp-content/uploads/2010/05/スクリーンショット（2010-05-20-5-20木-13.24.26）-161x300.png" alt="スクリーンショット（2010-05-20 5-20木 13.24.26）" title="スクリーンショット（2010-05-20 5-20木 13.24.26）" width="161" height="300" class="alignnone size-medium wp-image-2146" /></a></p>
<p>注意点は UIWebView のレンダリング処理は別スレッドで非同期に行われるため、webViewDidFinishLoad: の通知の時にすぐに UIImage への書き出し処理を実行すると不完全なページになってしまいます。上記コードの 27行目を下記のように変更してすぐに書き出し処理すると不完全なページになってしまいます。</p>
<pre class="cpp" name="code">
[self renderWebContent];
</pre>
<p><a href="http://www.syuhari.jp/blog/wp-content/uploads/2010/05/スクリーンショット（2010-05-20-5-20木-13.28.42）.png" ><img src="http://www.syuhari.jp/blog/wp-content/uploads/2010/05/スクリーンショット（2010-05-20-5-20木-13.28.42）-161x300.png" alt="スクリーンショット（2010-05-20 5-20木 13.28.42）" title="スクリーンショット（2010-05-20 5-20木 13.28.42）" width="161" height="300" class="alignnone size-medium wp-image-2148" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2145/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>[iPhone] UIWebView のタッチイベントを取得する</title>
		<link>http://www.syuhari.jp/blog/archives/2141</link>
		<comments>http://www.syuhari.jp/blog/archives/2141#comments</comments>
		<pubDate>Thu, 20 May 2010 02:36:53 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[iPhone/iPod touch]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[UIWebView]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2141</guid>
		<description><![CDATA[iPhoneSDK開発のレシピのレシピ47「UIWebView をフィンガージェスチャーで操作する」書かせていただいたのですが、この処理でプライベートAPI を使用しているために、以下のように修正しまさせていただきました。GitHub のサンプルコードでは既に先月修正済みなのですが正式にアナウンスしていなかったので、改めて説明させていただきます。
やりたいことは、Firefox などのマウスジェスチャーのように UIWebView をフィンガージェスチャーで操作するということです。UIWebView ではシングルタッチはスクロールや拡大縮小などがあるため、２本指でのタッチで左右にスワイプしたときに戻る、進むという動作をさせることにします。（フレーム内のスクロールに２本指でのタッチを使用しますが、まあその辺はとりあえず置いておいて下さい）

詳細なコードは GitHub にありますので、詳しくはそちらをご参照ください。
ポイントはフィンガージェスチャーを認識するためにタッチ動作をフックする UIWindow のサブクラス GestureWindow を作り、AppDelegate でその GestureWindow を使用するところです。UIWindow の sendEvent: ですべてのタッチ動作をフックして UIWebView への2本指でのマルチタッチのときのみ、delegateを通じてタッチイベントを通知します。また、フックしたタッチイベントは全てスーパークラスへそのまま渡すことにより、通常のタッチイベントを邪魔しないようにします。

@protocol GestureWindowDelegate

- (void) touchesBeganWeb:(NSSet *)touches withEvent:(UIEvent *)event;
- (void) touchesMovedWeb:(NSSet *)touches withEvent:(UIEvent *)event;
- (void) touchesEndedWeb:(NSSet *)touches withEvent:(UIEvent *)event;

@end

@interface GestureWindow : UIWindow {
    UIWebView* wView;
    id delegate;
}

@property (nonatomic, retain) UIWebView* [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.co.jp/gp/product/4798025798?ie=UTF8&#038;tag=8109-22&#038;linkCode=as2&#038;camp=247&#038;creative=7399&#038;creativeASIN=4798025798" target="_blank" class="liexternal">iPhoneSDK開発のレシピ</a>のレシピ47「UIWebView をフィンガージェスチャーで操作する」書かせていただいたのですが、この処理でプライベートAPI を使用しているために、以下のように修正しまさせていただきました。GitHub のサンプルコードでは既に先月修正済みなのですが正式にアナウンスしていなかったので、改めて説明させていただきます。</p>
<p>やりたいことは、Firefox などのマウスジェスチャーのように UIWebView をフィンガージェスチャーで操作するということです。UIWebView ではシングルタッチはスクロールや拡大縮小などがあるため、２本指でのタッチで左右にスワイプしたときに戻る、進むという動作をさせることにします。（フレーム内のスクロールに２本指でのタッチを使用しますが、まあその辺はとりあえず置いておいて下さい）<br />
<span id="more-2141"></span><br />
詳細なコードは <a href="http://github.com/ktakayama/iPhoneSDK-RecipeBook/tree/master/047/" target="_blank" class="liexternal">GitHub</a> にありますので、詳しくはそちらをご参照ください。</p>
<p>ポイントはフィンガージェスチャーを認識するためにタッチ動作をフックする UIWindow のサブクラス GestureWindow を作り、AppDelegate でその GestureWindow を使用するところです。UIWindow の sendEvent: ですべてのタッチ動作をフックして UIWebView への2本指でのマルチタッチのときのみ、delegateを通じてタッチイベントを通知します。また、フックしたタッチイベントは全てスーパークラスへそのまま渡すことにより、通常のタッチイベントを邪魔しないようにします。</p>
<pre class="cpp" name="code">
@protocol GestureWindowDelegate

- (void) touchesBeganWeb:(NSSet *)touches withEvent:(UIEvent *)event;
- (void) touchesMovedWeb:(NSSet *)touches withEvent:(UIEvent *)event;
- (void) touchesEndedWeb:(NSSet *)touches withEvent:(UIEvent *)event;

@end

@interface GestureWindow : UIWindow {
    UIWebView* wView;
    id delegate;
}

@property (nonatomic, retain) UIWebView* wView;
@property (nonatomic, assign) id delegate;

@end
</pre>
<pre class="cpp" name="code">
@implementation GestureWindow

@synthesize wView, delegate;

-(void) dealloc {
    [wView release];
    [super dealloc];
}

- (void)sendEvent:(UIEvent *)event {
    [super sendEvent:event];
    if (wView == nil || delegate == nil) {
        return;
    }
    // 2本指でのマルチタッチか
    NSSet *touches = [event allTouches];
    if (touches.count != 2) {
        return;
    }

    UITouch *touch = touches.anyObject;
    // 指定のUIWebViewへのタッチか
    if ([touch.view isDescendantOfView:wView] == NO) {
        return;
    }

    switch (touch.phase) {
        case UITouchPhaseBegan:
            if ([self.delegate
                 respondsToSelector:@selector(touchesBeganWeb:withEvent:)]) {
                [self.delegate
                    performSelector:@selector(touchesBeganWeb:withEvent:)
                    withObject:touches withObject:event];
            }
            break;
        case UITouchPhaseMoved:
            if ([self.delegate
                 respondsToSelector:@selector(touchesMovedWeb:withEvent:)]) {
                [self.delegate
                    performSelector:@selector(touchesMovedWeb:withEvent:)
                    withObject:touches withObject:event];
            }
            break;
        case UITouchPhaseEnded:
            if ([self.delegate
                 respondsToSelector:@selector(touchesEndedWeb:withEvent:)]) {
                [self.delegate
                    performSelector:@selector(touchesEndedWeb:withEvent:)
                    withObject:touches withObject:event];
            }
        default:
            return;
            break;
    }
}

@end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2141/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>[iPhone] UIWebView のリリース前に delegate に nil をセットする必要がある</title>
		<link>http://www.syuhari.jp/blog/archives/2137</link>
		<comments>http://www.syuhari.jp/blog/archives/2137#comments</comments>
		<pubDate>Thu, 20 May 2010 00:56:51 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[iPhone/iPod touch]]></category>
		<category><![CDATA[delegate]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[UIWebView]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2137</guid>
		<description><![CDATA[UIWebView のインスタンスに delegate を指定している場合は以下のように release する前に delegate に nil をセットする必要があります。

- (void) viewDidLoad {
    webView = [[UIWebView alloc] init];
    webView.delegate = self;
    ....
}

- (void)dealloc {
    webView.delegate = nil;
    [webView release];
}


アップルのマニュアルにも以下のように書かれています。
Important: Before releasing an instance of UIWebView for which you have set [...]]]></description>
			<content:encoded><![CDATA[<p>UIWebView のインスタンスに delegate を指定している場合は以下のように release する前に delegate に nil をセットする必要があります。</p>
<pre class="cpp" name="code">
- (void) viewDidLoad {
    webView = [[UIWebView alloc] init];
    webView.delegate = self;
    ....
}

- (void)dealloc {
    webView.delegate = nil;
    [webView release];
}
</pre>
<p><span id="more-2137"></span><br />
アップルのマニュアルにも以下のように書かれています。</p>
<blockquote><p>Important: Before releasing an instance of UIWebView for which you have set a delegate, you must first set its delegate property to nil. This can be done, for example, in your dealloc method.</p></blockquote>
<p>理由は UIWebView のロード処理が別スレッドで行われているために、release 後にデリゲートメソッドを呼ぶ可能性があるためだそうです。</p>
<p>以下のコードで実験してみました。UIWebView のインスタンスを生成後、loadRequest で読み込みます。その直後に UIWebView のインスタンスをリリースしてみました。そして、webView.delegate = nil を入れた時と入れないときの挙動を試してみるとわかりやすいです。</p>
<pre class="cpp" name="code">
- (void)viewDidLoad {
    [super viewDidLoad];

    UIWebView* webView = [[UIWebView alloc] init];
    [self.view addSubview:webView];
    webView.delegate = self;
    NSURL* url = [NSURL URLWithString:@"http://example.com"];
    [webView loadRequest:[NSURLRequest requestWithURL:url]];

    webView.delegate = nil;  // この行を入れた時と入れないときの挙動の違い
    [webView release];
}

- (void)webViewDidFinishLoad:(UIWebView *)_webView {
    NSLog(@"finish load");
}
</pre>
<p>delegate に nil を設定していないとデリゲートメソッドが呼ばれます。もし、このUIViewController のインスタンスが破棄されていればアプリが落ちてしまいます。</p>
<p>意図しないタイミングでデリゲートメソッドが呼ばれないために UIWebView のインスタンスをリリースする前にはデリゲートに nil をセットしなければいけないということです。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2137/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Mac のハードディスクアイコンがすごい！</title>
		<link>http://www.syuhari.jp/blog/archives/2130</link>
		<comments>http://www.syuhari.jp/blog/archives/2130#comments</comments>
		<pubDate>Wed, 19 May 2010 21:28:11 +0000</pubDate>
		<dc:creator>matsuura</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[HDD]]></category>
		<category><![CDATA[Icon]]></category>

		<guid isPermaLink="false">http://www.syuhari.jp/blog/?p=2130</guid>
		<description><![CDATA[iPhone アプリのアイコン作成にはいつも苦労しています。アップルが作るアイコンはどれもきれいなものなので参考にしようと思いなにげなく見ていたら、ハードディスクアイコンの上の方のラベルらしきものが気になった。何か書いてある。こんなところまでと思って、なにげに拡大してみたら本当に文字が書かれている。（下のアイコン画像はクリックで拡大できます）


ググッたらフォトショップを使用してうまい具合に拡大していた人がいました。
BittenMac Log
Internal Hard Disk
    Handle the hard drive carefully to avoid damaging the circuit board.
    Make sure you are properly grounded.
    電子回路にダメージを与えないよう，取り扱いには注意してください．
    正しく接地していることを確認してください．
すごいこだわりですね！
電卓のアイコンの数字の意味も気になるなぁ
]]></description>
			<content:encoded><![CDATA[<p>iPhone アプリのアイコン作成にはいつも苦労しています。アップルが作るアイコンはどれもきれいなものなので参考にしようと思いなにげなく見ていたら、ハードディスクアイコンの上の方のラベルらしきものが気になった。何か書いてある。こんなところまでと思って、なにげに拡大してみたら本当に文字が書かれている。（下のアイコン画像はクリックで拡大できます）<br />
<span id="more-2130"></span><br />
<a href="http://www.syuhari.jp/blog/wp-content/uploads/2010/05/スクリーンショット（2010-05-20-5-20木-6.10.12）.png" ><img src="http://www.syuhari.jp/blog/wp-content/uploads/2010/05/スクリーンショット（2010-05-20-5-20木-6.10.12）-286x300.png" alt="スクリーンショット（2010-05-20 5-20木 6.10.12）" title="スクリーンショット（2010-05-20 5-20木 6.10.12）" width="286" height="300" class="alignnone size-medium wp-image-2131" /></a></p>
<p>ググッたらフォトショップを使用してうまい具合に拡大していた人がいました。<br />
<a href="http://mac-coconut.blogspot.com/" target="_blank" class="liexternal">BittenMac Log</a></p>
<blockquote><p>Internal Hard Disk<br />
    Handle the hard drive carefully to avoid damaging the circuit board.<br />
    Make sure you are properly grounded.<br />
    電子回路にダメージを与えないよう，取り扱いには注意してください．<br />
    正しく接地していることを確認してください．</p></blockquote>
<p>すごいこだわりですね！<br />
電卓のアイコンの数字の意味も気になるなぁ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.syuhari.jp/blog/archives/2130/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
