<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>CLSmooth BLOG...</title>
	<atom:link href="http://clsmooth.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://clsmooth.wordpress.com</link>
	<description>ぼちぼち行きましょ</description>
	<lastBuildDate>Sat, 23 Oct 2010 14:24:34 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='clsmooth.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>CLSmooth BLOG...</title>
		<link>http://clsmooth.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://clsmooth.wordpress.com/osd.xml" title="CLSmooth BLOG..." />
	<atom:link rel='hub' href='http://clsmooth.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MacBook Air 11インチ　その後</title>
		<link>http://clsmooth.wordpress.com/2010/10/23/macbook-air-11%e3%82%a4%e3%83%b3%e3%83%81%e3%80%80%e3%81%9d%e3%81%ae%e5%be%8c/</link>
		<comments>http://clsmooth.wordpress.com/2010/10/23/macbook-air-11%e3%82%a4%e3%83%b3%e3%83%81%e3%80%80%e3%81%9d%e3%81%ae%e5%be%8c/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 13:00:38 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[MacBook]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=221</guid>
		<description><![CDATA[今日までにインストールしたものをまとめてみます Firefox 3.6.11 TabMix Plus Firefox Sync AutoPager FireBug Google Chrome Xcode and iOS SDK 4.1 VMWare Fusion3 CentOS5.5 Eclipse 3.6.1 Pleiades 1.3.1 Aptana Studio 2.0.5 PDT 2.2.1 Eclipse EGit Subclipse CDT 7.0.1 必要なのはこんなもんか。。。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=221&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>今日までにインストールしたものをまとめてみます</p>
<ul>
<li>Firefox 3.6.11</li>
<ul>
<li>TabMix Plus</li>
<li>Firefox Sync</li>
<li>AutoPager</li>
<li>FireBug</li>
</ul>
<li>Google Chrome</li>
<li>Xcode and iOS SDK 4.1</li>
<li>VMWare Fusion3</li>
<ul>
<li>CentOS5.5</li>
</ul>
<li>Eclipse 3.6.1</li>
<ul>
<li>Pleiades 1.3.1</li>
<li>Aptana Studio 2.0.5</li>
<li>PDT 2.2.1</li>
<li>Eclipse EGit</li>
<li>Subclipse</li>
<li>CDT 7.0.1</li>
</ul>
</ul>
<p>必要なのはこんなもんか。。。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=221&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/10/23/macbook-air-11%e3%82%a4%e3%83%b3%e3%83%81%e3%80%80%e3%81%9d%e3%81%ae%e5%be%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>
	</item>
		<item>
		<title>MacBook Air 11インチ買った！</title>
		<link>http://clsmooth.wordpress.com/2010/10/22/macbook-air-11%e3%82%a4%e3%83%b3%e3%83%81%e8%b2%b7%e3%81%a3%e3%81%9f%ef%bc%81/</link>
		<comments>http://clsmooth.wordpress.com/2010/10/22/macbook-air-11%e3%82%a4%e3%83%b3%e3%83%81%e8%b2%b7%e3%81%a3%e3%81%9f%ef%bc%81/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 15:00:01 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[MacBook]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=211</guid>
		<description><![CDATA[始めはちょろっと見るだけにしとこと思ってたMacBook Air 11インチ。 アップルストア銀座で見たら欲しくなって、帰りに買ってました。。。 SSD128GBモデルです。やっぱしSSD早い。 そこで今日インストールしたものを備忘録代わりに。 Firefox 3.6.11 TabMix Plus Firefox Sync Xcode and iOS SDK 4.1 VMWare Fusion3 Eclipse 3.6.1 とりあえず、こんなとこですかね。。。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=211&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>始めはちょろっと見るだけにしとこと思ってたMacBook Air 11インチ。</p>
<p>アップルストア銀座で見たら欲しくなって、帰りに買ってました。。。<br />
SSD128GBモデルです。やっぱしSSD早い。</p>
<p><img src="http://clsmooth.files.wordpress.com/2010/10/e58699e79c9f-e1287670513288.jpg?w=224&#038;h=300" alt="" title="写真" width="224" height="300" class="alignnone size-thumbnail wp-image-212" /></p>
<p>そこで今日インストールしたものを備忘録代わりに。</p>
<ul>
<li>Firefox 3.6.11</li>
<ul>
<li>TabMix Plus</li>
<li>Firefox Sync</li>
</ul>
<li>Xcode and iOS SDK 4.1</li>
<li>VMWare Fusion3</li>
<li>Eclipse 3.6.1</li>
</ul>
<p>とりあえず、こんなとこですかね。。。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=211&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/10/22/macbook-air-11%e3%82%a4%e3%83%b3%e3%83%81%e8%b2%b7%e3%81%a3%e3%81%9f%ef%bc%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/10/e58699e79c9f-e1287670513288.jpg?w=112" medium="image">
			<media:title type="html">写真</media:title>
		</media:content>
	</item>
		<item>
		<title>iPadで追加されたUISplitViewを試してみる</title>
		<link>http://clsmooth.wordpress.com/2010/07/04/ipad%e3%81%a7%e8%bf%bd%e5%8a%a0%e3%81%95%e3%82%8c%e3%81%9fuisplitview%e3%82%92%e8%a9%a6%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b/</link>
		<comments>http://clsmooth.wordpress.com/2010/07/04/ipad%e3%81%a7%e8%bf%bd%e5%8a%a0%e3%81%95%e3%82%8c%e3%81%9fuisplitview%e3%82%92%e8%a9%a6%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 15:24:14 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=202</guid>
		<description><![CDATA[魔法のようなデバイスと言われるiPadですが 画面がでかいだけあり、iPhoneとは違うUIが採用されています。 その最たるものがUISplitView。 これはInterface Builderを利用すればすぐできるのですが、 Interface Builderを使わずにUISplitViewを作成する方法を乗せてみたいと思います。 今回は単純化するためにPopOverは考えないものとします。 SplitViewというWindow-basedのプロジェクトを作成し、RootViewControllerとFirstViewControllerというクラスを作成します。 ApplicationDelegateの編集 ApplicationDelegateから見てみます SplitViewAppDelegate.h SplitViewAppDelegate.m RootViewControllerの編集 RootViewControllerは左側のTableViewの表示を行い、UISplitViewのDelegateにもなります。 RootViewController.h RootViewController.m FirstViewControllerの編集 FirstViewControllerは右側の詳細情報を表示するペインになります。 FirstViewController.h FirstViewController.m 実行結果は。。。 こんな風になりますね〜<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=202&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>魔法のようなデバイスと言われるiPadですが<br />
画面がでかいだけあり、iPhoneとは違うUIが採用されています。</p>
<p>その最たるものがUISplitView。</p>
<p>これはInterface Builderを利用すればすぐできるのですが、<br />
Interface Builderを使わずにUISplitViewを作成する方法を乗せてみたいと思います。</p>
<p>今回は単純化するためにPopOverは考えないものとします。</p>
<p>SplitViewというWindow-basedのプロジェクトを作成し、RootViewControllerとFirstViewControllerというクラスを作成します。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">ApplicationDelegateの編集</h2>
</div>
<p>ApplicationDelegateから見てみます</p>
<p><strong><em>SplitViewAppDelegate.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;

@class RootViewController;
@class FirstViewController;

@interface SplitViewAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
    UIWindow *window;
	UISplitViewController *splitViewController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UISplitViewController *splitViewController;

@end
</pre></p>
<p><strong><em>SplitViewAppDelegate.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;SplitViewAppDelegate.h&quot;
#import &quot;RootViewController.h&quot;
#import &quot;FirstViewController.h&quot;

@implementation SplitViewAppDelegate

@synthesize window, splitViewController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
	
    // Override point for customization after application launch.
	
	self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
	
	RootViewController *rootViewController = [[RootViewController alloc] init];
	FirstViewController *firstViewController = [[FirstViewController alloc] init];
	
	splitViewController = [[UISplitViewController alloc] init];
	splitViewController.viewControllers = [NSArray arrayWithObjects:rootViewController, firstViewController, nil];	
	splitViewController.delegate = rootViewController;
	
	[window addSubview:splitViewController.view];
    [window makeKeyAndVisible];
	
	return YES;
}


- (void)applicationWillResignActive:(UIApplication *)application {
    /*
     Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
     */
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
    /*
     Restart any tasks that were paused (or not yet started) while the application was inactive.
     */
}


- (void)applicationWillTerminate:(UIApplication *)application {
    /*
     Called when the application is about to terminate.
     */
}


#pragma mark -
#pragma mark Memory management

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
    /*
     Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
     */
}


- (void)dealloc {
	[splitViewController release];
    [window release];
    [super dealloc];
}


@end
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">RootViewControllerの編集</h2>
</div>
<p>RootViewControllerは左側のTableViewの表示を行い、UISplitViewのDelegateにもなります。</p>
<p><strong><em>RootViewController.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;


@interface RootViewController : UITableViewController &lt;UISplitViewControllerDelegate&gt; {

}

@end
</pre></p>
<p><strong><em>RootViewController.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;RootViewController.h&quot;
#import &quot;FirstViewController.h&quot;

@implementation RootViewController

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}



- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Overriden to allow any orientation.
    return YES;
}


- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}


- (void)viewDidUnload {
    [super viewDidUnload];
	
}

- (void)splitViewController:(UISplitViewController*)svc 
	 willHideViewController:(UIViewController *)aViewController 
		  withBarButtonItem:(UIBarButtonItem*)barButtonItem 
	   forPopoverController:(UIPopoverController*)pc {

}	

- (void)splitViewController:(UISplitViewController*)svc 
	 willShowViewController:(UIViewController *)aViewController 
  invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
	
	return 1;
}

- (NSInteger)tableView:(UITableView *)tableView 
 numberOfRowsInSection:(NSInteger)section {
	
	return 5;
}

- (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];
	}
	
	cell.textLabel.text = [NSString stringWithFormat:@&quot;Cell %d&quot;, (indexPath.row + 1)];
	
	return cell;
}

- (void)dealloc {
    [super dealloc];
}

@end
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">FirstViewControllerの編集</h2>
</div>
<p>FirstViewControllerは右側の詳細情報を表示するペインになります。</p>
<p><strong><em>FirstViewController.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;


@interface FirstViewController : UIViewController {

}

@end
</pre></p>
<p><strong><em>FirstViewController.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;FirstViewController.h&quot;


@implementation FirstViewController

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	self.view.backgroundColor = [UIColor redColor];
}



- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Overriden to allow any orientation.
    return YES;
}


- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}


- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">実行結果は。。。</h2>
</div>
<p>こんな風になりますね〜</p>
<p><a href="http://clsmooth.files.wordpress.com/2010/07/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-07-04-0-23-30efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/07/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-07-04-0-23-30efbc89.png?w=674&#038;h=568" alt="" title="スクリーンショット（2010-07-04 0.23.30）" width="674" height="568" class="alignnone size-full wp-image-207" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=202&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/07/04/ipad%e3%81%a7%e8%bf%bd%e5%8a%a0%e3%81%95%e3%82%8c%e3%81%9fuisplitview%e3%82%92%e8%a9%a6%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/07/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-07-04-0-23-30efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-07-04 0.23.30）</media:title>
		</media:content>
	</item>
		<item>
		<title>Hadoopをインストールしてみた</title>
		<link>http://clsmooth.wordpress.com/2010/04/29/hadoop%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/29/hadoop%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 15:33:02 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[Hadoop]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=194</guid>
		<description><![CDATA[今話題ですよね、Hadoop。（もうちょい遅いですかね。。。） 分散Key-Valueストアも少し検証してみたいので、まずはインストールしてみることにしました。 インストール環境の準備 Hadoopは分散環境なので、複数台のサーバで連携し合いながら動作します。 が、とりあえず今回はインストールしてみて、動作を確認するためだけなので、 MacBook Pro上でVMWare FusionでCentOSが動作するVMを作成し、 その上にインストールしてみることにします。 まずは、HadoopはJavaで実装されているので、Javaのインストールを行います。 Javaがインストールされたかどうか確認します。 環境変数JAVA_HOMEを設定します。 またHadoopはノード間でSSHを使用して連携を行うためSSH用の鍵を作成しておきます。 Hadoopのインストール ここまで準備が出来たので、Hadoopをインストールしてみます。 基本的にはダウンロードして解凍するだけでです。 ここでサンプルコードを実行してみます ここで円周率の計算がされているログが出力されれば成功ですね〜。 次は実際に使用する観点から動かしてみます。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=194&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>今話題ですよね、Hadoop。（もうちょい遅いですかね。。。）</p>
<p>分散Key-Valueストアも少し検証してみたいので、まずはインストールしてみることにしました。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">インストール環境の準備</h2>
</div>
<p>Hadoopは分散環境なので、複数台のサーバで連携し合いながら動作します。<br />
が、とりあえず今回はインストールしてみて、動作を確認するためだけなので、<br />
MacBook Pro上でVMWare FusionでCentOSが動作するVMを作成し、<br />
その上にインストールしてみることにします。</p>
<p>まずは、HadoopはJavaで実装されているので、Javaのインストールを行います。</p>
<p><pre class="brush: plain;">
wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u20-linux-i586-rpm.bin?BundledLineItemUUID=bu5IBe.l8q0AAAEoRX0AjETQ&amp;OrderID=bkxIBe.lDP0AAAEoOn0AjETQ&amp;ProductID=guBIBe.oc_wAAAEnaDJHqPYe&amp;FileName=/jdk-6u20-linux-i586-rpm.bin
[1] 2779
[2] 2780
[3] 2781
[2]   Done                    OrderID=bkxIBe.lDP0AAAEoOn0AjETQ
[root@localhost src]# --2010-04-28 13:25:27--  http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u20-linux-i586-rpm.bin?BundledLineItemUUID=bu5IBe.l8q0AAAEoRX0AjETQ
cds.sun.com をDNSに問いあわせています... 72.5.239.134
cds.sun.com|72.5.239.134|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 302 Found
場所: http://cds-esd.sun.com/ESD6/JSCDL/jdk/6u20-b02/jdk-6u20-linux-i586-rpm.bin?AuthParam=1272465013_69efe8ed4e459c343b6d48851a694c44&amp;TicketId=co04K03xQzc0OiHnNUI0hnebPig%3D&amp;GroupName=CDS&amp;FilePath=/ESD6/JSCDL/jdk/6u20-b02/jdk-6u20-linux-i586-rpm.bin&amp;File=jdk-6u20-linux-i586-rpm.bin [続く]
--2010-04-28 13:25:28--  http://cds-esd.sun.com/ESD6/JSCDL/jdk/6u20-b02/jdk-6u20-linux-i586-rpm.bin?AuthParam=1272465013_69efe8ed4e459c343b6d48851a694c44&amp;TicketId=co04K03xQzc0OiHnNUI0hnebPig%3D&amp;GroupName=CDS&amp;FilePath=/ESD6/JSCDL/jdk/6u20-b02/jdk-6u20-linux-i586-rpm.bin&amp;File=jdk-6u20-linux-i586-rpm.bin
cds-esd.sun.com をDNSに問いあわせています... 118.155.230.99
cds-esd.sun.com|118.155.230.99|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 80367391 (77M) [application/x-sdlc]
`jdk-6u20-linux-i586-rpm.bin?AuthParam=1272465013_69efe8ed4e459c343b6d48851a694c44&amp;TicketId=co04K03xQzc0OiHnNUI0hnebPig=&amp;GroupName=CDS&amp;FilePath=%2FESD6%2FJSCDL%2Fjdk%2F6u20-b02%2Fjdk-6u20-linux-i586-rpm.bin&amp;File=jdk-6u20-linux-i586-rpm.bin' に保存中

100%[======================================&gt;] 80,367,391  2.31M/s 時間 35s     

2010-04-28 13:26:04 (2.20 MB/s) - `jdk-6u20-linux-i586-rpm.bin?AuthParam=1272465013_69efe8ed4e459c343b6d48851a694c44&amp;TicketId=co04K03xQzc0OiHnNUI0hnebPig=&amp;GroupName=CDS&amp;FilePath=%2FESD6%2FJSCDL%2Fjdk%2F6u20-b02%2Fjdk-6u20-linux-i586-rpm.bin&amp;File=jdk-6u20-linux-i586-rpm.bin' へ保存完了 [80367391/80367391]
# mv jdk-6u20-linux-i586-rpm.bin\?AuthParam\=1272465013_69efe8ed4e459c343b6d48851a694c44\&amp;TicketId\=co04K03xQzc0OiHnNUI0hnebPig\=\&amp;GroupName\=CDS\&amp;FilePath\=%2FESD6%2FJSCDL%2Fjdk%2F6u20-b02%2Fjdk-6u20-linux-i586-rpm.bin\&amp;File\=jdk-6u20-linux-i586-rpm.bin jdk-6u20-linux-i586-rpm.bin
# chmod 755 jdk-6u20-linux-i586-rpm.bin
# ./jdk-6u20-linux-i586-rpm.bin
/* Do you agree to the above license terms? [yes or no] と聞いてきたら */
yes
/* Press Enter to continue.....と表示されたら */
Enter
</pre></p>
<p>Javaがインストールされたかどうか確認します。</p>
<p><pre class="brush: plain;">
# java -version
java version &quot;1.6.0_20&quot;
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
</pre></p>
<p>環境変数JAVA_HOMEを設定します。</p>
<p><pre class="brush: plain;">
# vi ~/.bash_profile
/* 下記の1行を追加 */
export JAVA_HOME=/usr/java/latest
</pre></p>
<p>またHadoopはノード間でSSHを使用して連携を行うためSSH用の鍵を作成しておきます。</p>
<p><pre class="brush: plain;">
# ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
Generating public/private dsa key pair.
Created directory '/root/.ssh'.
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
02:ea:81:33:01:4b:91:5f:5a:b8:8e:6c:09:ea:00:37 root@localhost.localdomain
# cat ~/.ssh/id_dsa.pub &gt;&gt; ~/.ssh/authorized_keys
# chmod 700 ~/.ssh/
# chmod 611 ~/.ssh/authorized_keys 
# chmod 600 ~/.ssh/id_dsa
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">Hadoopのインストール</h2>
</div>
<p>ここまで準備が出来たので、Hadoopをインストールしてみます。<br />
基本的にはダウンロードして解凍するだけでです。</p>
<p><pre class="brush: plain;">
# wget http://www.meisei-u.ac.jp/mirror/apache/dist/hadoop/core/hadoop-0.20.2/hadoop-0.20.2.tar.gz
--2010-04-28 15:01:17--  http://www.meisei-u.ac.jp/mirror/apache/dist/hadoop/core/hadoop-0.20.2/hadoop-0.20.2.tar.gz
www.meisei-u.ac.jp をDNSに問いあわせています... 202.232.192.34
www.meisei-u.ac.jp|202.232.192.34|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 44575568 (43M) [application/x-gzip]
`hadoop-0.20.2.tar.gz' に保存中

100%[======================================&gt;] 44,575,568  10.7M/s 時間 4.1s    

2010-04-28 15:01:21 (10.3 MB/s) - `hadoop-0.20.2.tar.gz' へ保存完了 [44575568/44575568]
# tar -xvzf hadoop-0.20.2.tar.gz
</pre></p>
<p>ここでサンプルコードを実行してみます</p>
<p><pre class="brush: plain;">
# cd hadoop-0.20.2
# ./bin/hadoop jar hadoop-0.20.2-examples.jar pi 1 1000
Number of Maps  = 1
Samples per Map = 1000
Wrote input for Map #0
Starting Job
10/04/29 14:27:35 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
10/04/29 14:27:35 INFO mapred.FileInputFormat: Total input paths to process : 1
10/04/29 14:27:36 INFO mapred.JobClient: Running job: job_local_0001
10/04/29 14:27:36 INFO mapred.FileInputFormat: Total input paths to process : 1
10/04/29 14:27:36 INFO mapred.MapTask: numReduceTasks: 1
10/04/29 14:27:36 INFO mapred.MapTask: io.sort.mb = 100
10/04/29 14:27:37 INFO mapred.JobClient:  map 0% reduce 0%
10/04/29 14:27:37 INFO mapred.MapTask: data buffer = 79691776/99614720
10/04/29 14:27:37 INFO mapred.MapTask: record buffer = 262144/327680
10/04/29 14:27:37 INFO mapred.MapTask: Starting flush of map output
10/04/29 14:27:37 INFO mapred.MapTask: Finished spill 0
10/04/29 14:27:37 INFO mapred.TaskRunner: Task:attempt_local_0001_m_000000_0 is done. And is in the process of commiting
10/04/29 14:27:37 INFO mapred.LocalJobRunner: Generated 1000 samples.
10/04/29 14:27:37 INFO mapred.TaskRunner: Task 'attempt_local_0001_m_000000_0' done.
10/04/29 14:27:37 INFO mapred.LocalJobRunner: 
10/04/29 14:27:37 INFO mapred.Merger: Merging 1 sorted segments
10/04/29 14:27:37 INFO mapred.Merger: Down to the last merge-pass, with 1 segments left of total size: 24 bytes
10/04/29 14:27:37 INFO mapred.LocalJobRunner: 
10/04/29 14:27:37 INFO mapred.TaskRunner: Task:attempt_local_0001_r_000000_0 is done. And is in the process of commiting
10/04/29 14:27:37 INFO mapred.LocalJobRunner: 
10/04/29 14:27:37 INFO mapred.TaskRunner: Task attempt_local_0001_r_000000_0 is allowed to commit now
10/04/29 14:27:37 INFO mapred.FileOutputCommitter: Saved output of task 'attempt_local_0001_r_000000_0' to file:/usr/local/src/hadoop-0.20.2/PiEstimator_TMP_3_141592654/out
10/04/29 14:27:37 INFO mapred.LocalJobRunner: reduce &amp;gt; reduce
10/04/29 14:27:37 INFO mapred.TaskRunner: Task 'attempt_local_0001_r_000000_0' done.
10/04/29 14:27:38 INFO mapred.JobClient:  map 100% reduce 100%
10/04/29 14:27:38 INFO mapred.JobClient: Job complete: job_local_0001
10/04/29 14:27:38 INFO mapred.JobClient: Counters: 13
10/04/29 14:27:38 INFO mapred.JobClient:   FileSystemCounters
10/04/29 14:27:38 INFO mapred.JobClient:     FILE_BYTES_READ=312102
10/04/29 14:27:38 INFO mapred.JobClient:     FILE_BYTES_WRITTEN=342167
10/04/29 14:27:38 INFO mapred.JobClient:   Map-Reduce Framework
10/04/29 14:27:38 INFO mapred.JobClient:     Reduce input groups=2
10/04/29 14:27:38 INFO mapred.JobClient:     Combine output records=0
10/04/29 14:27:38 INFO mapred.JobClient:     Map input records=1
10/04/29 14:27:38 INFO mapred.JobClient:     Reduce shuffle bytes=0
10/04/29 14:27:38 INFO mapred.JobClient:     Reduce output records=0
10/04/29 14:27:38 INFO mapred.JobClient:     Spilled Records=4
10/04/29 14:27:38 INFO mapred.JobClient:     Map output bytes=18
10/04/29 14:27:38 INFO mapred.JobClient:     Map input bytes=24
10/04/29 14:27:38 INFO mapred.JobClient:     Combine input records=0
10/04/29 14:27:38 INFO mapred.JobClient:     Map output records=2
10/04/29 14:27:38 INFO mapred.JobClient:     Reduce input records=2
Job Finished in 2.803 seconds
Estimated value of Pi is 3.14800000000000000000
</pre></p>
<p>ここで円周率の計算がされているログが出力されれば成功ですね〜。</p>
<p>次は実際に使用する観点から動かしてみます。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=194&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/29/hadoop%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%97%e3%81%a6%e3%81%bf%e3%81%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>
	</item>
		<item>
		<title>UITableViewControllerを使用してみる</title>
		<link>http://clsmooth.wordpress.com/2010/04/27/uitableviewcontroller%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/27/uitableviewcontroller%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 14:13:33 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=181</guid>
		<description><![CDATA[今回はiPhoneの中でもよく使われるであろうUITableViewを使用してみたいと思います。 TableViewを使う際にはUITableViewとUITableViewControllerの二つの選択肢があるのですが 今回はUITableViewControllerを使用します。 UITableViewControllerはUITableViewよりも自動的にいろいろやってくれます。 例えばこんなこと。 * テーブルが表示される際(viewWillAppear:)に、データのリロード、選択行の解除。 * テーブルが表示された後(viewDidAppear:)に、スクロールバーの点滅。 * ナビゲーションバーの編集/完了ボタンを押したときに編集/通常モードに移行。 では、実際にプロジェクト作成してみましょう。 新規プロジェクトの作成 さて今回もTableDemoという名前で「Windows-Based Application」で作成します。 そこでできたプロジェクト内のフォルダ「Classes」を選択し 「ファイル」→「新規ファイル」→「UIviewController subClass」を選択、TableDemoViewControllerと名前を付けて保存します。 Interface Builderと分離はしておきます。 ViewControllerの編集 まずはViewControllerから編集をしていきます。 TableDemoViewController.h TableDemoViewController.m AppDelegateの編集 最後にDelegateのソースですが、こちらも昨日と同様、基本的に作成したViewControllerをインスタンス化してwindowにsubviewとして貼付けてるだけです。 TableDemoAppDelegate.h TableDemoAppDelegate.m こんな風にでましたね〜<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=181&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>今回はiPhoneの中でもよく使われるであろうUITableViewを使用してみたいと思います。</p>
<p>TableViewを使う際にはUITableViewとUITableViewControllerの二つの選択肢があるのですが<br />
今回はUITableViewControllerを使用します。</p>
<p>UITableViewControllerはUITableViewよりも自動的にいろいろやってくれます。</p>
<p>例えばこんなこと。</p>
<p>    * テーブルが表示される際(viewWillAppear:)に、データのリロード、選択行の解除。<br />
    * テーブルが表示された後(viewDidAppear:)に、スクロールバーの点滅。<br />
    * ナビゲーションバーの編集/完了ボタンを押したときに編集/通常モードに移行。</p>
<p>では、実際にプロジェクト作成してみましょう。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">新規プロジェクトの作成</h2>
</div>
<p>さて今回もTableDemoという名前で「Windows-Based Application」で作成します。</p>
<p>そこでできたプロジェクト内のフォルダ「Classes」を選択し</p>
<p>「ファイル」→「新規ファイル」→「UIviewController subClass」を選択、TableDemoViewControllerと名前を付けて保存します。</p>
<p>Interface Builderと分離はしておきます。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">ViewControllerの編集</h2>
</div>
<p>まずはViewControllerから編集をしていきます。</p>
<p><strong><em>TableDemoViewController.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;

// TableViewを使うのでUIViewContorollerを使うのではなく、UITableViewControllerを使う
@interface TableDemoViewController : UITableViewController {
	// NSMUtableArrayはインスタンス作成後、可変なサイズの配列
	// 可変じゃないのはNSArray
	NSMutableArray *fileList;	
}

-(void) startEditing;
-(void) stopEditing;
-(void) reload;

@end
</pre></p>
<p><strong><em>TableDemoViewController.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;TableDemoViewController.h&quot;


@implementation TableDemoViewController

-(id) init{
	self = [super init];
	if(self != nil){
		[self reload];
		
		// navigation Barの右側に[Edit]ボタンを表示する。
		self.navigationItem.rightBarButtonItem
		= [[[UIBarButtonItem alloc]
			initWithBarButtonSystemItem:UIBarButtonSystemItemEdit 
			target:self action:@selector(startEditing)] autorelease];
		
		// navigation Barの左側に[reload]ボタンを表示する。
		self.navigationItem.leftBarButtonItem
		= [[[UIBarButtonItem	alloc]
			initWithTitle:@&quot;reload&quot; 
			style:UIBarButtonItemStylePlain 
			target:self action:@selector(reload)] autorelease];
		
	}

	return self;
}

-(void) startEditing{
	// 編集モードにする
	[self.tableView setEditing:YES animated:YES];
	
	// navigation Barの右側に[Done]ボタンを表示する。
	self.navigationItem.rightBarButtonItem
	= [[[UIBarButtonItem alloc]
		initWithBarButtonSystemItem:UIBarButtonSystemItemDone 
		target:self 
		action:@selector(stopEditing)] autorelease];
}

-(void) stopEditing{
	// 編集モードをやめる
	[self.tableView setEditing:NO animated:YES];
	
	// navigation Barの右側に[Edit]ボタンを表示する。
	self.navigationItem.rightBarButtonItem
	= [[[UIBarButtonItem alloc]
		initWithBarButtonSystemItem:UIBarButtonSystemItemEdit 
		target:self 
		action:@selector(startEditing)] autorelease];
}

-(void) reload{
	// NSDirectoryEnumeratorはディレクトリ内のファイル名を取り出せるようにする
	NSDirectoryEnumerator *dirEnum;
	NSString *file;
	
	fileList = [[NSMutableArray alloc] init];
	
	// homeディレクトリ内のファイル名を格納する
	dirEnum = [[NSFileManager defaultManager] enumeratorAtPath:NSHomeDirectory()];
	
	// ファイル名を次々に取り出す
	while ((file = [dirEnum nextObject])) {
		[fileList addObject:file];
	}
	
	[self.tableView reloadData];
}

// numberOfSectionsInTableViewはテーブル内のセクション数を返す。今回は1個
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView{
	return 1;
}

// numberOfRowsInSectionはセクション内の行数を返す。
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger) section{
	return [fileList count];
}	

// このメソッドはテーブルのレコード数だけループして呼ばれる。
// indexPathにはループのセル番号（0スタート）が入る
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
	
	NSString *CellIdentifier = [fileList objectAtIndex:[indexPath indexAtPosition:1]];
	
	// セルを作成する
	UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
	
	// 以前つかったcellのデータがあるのか
	if(cell == nil){
		// 無ければ作成する
		cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
		cell.textLabel.text = CellIdentifier;
		
		UIFont *font = [UIFont fontWithName:@&quot;Courier&quot; size:12.0];
		cell.textLabel.font = font;
	}
	
	return cell;
	
}	

// commitEditingStyleはEdit呼ばれた時に削除モードになるように呼ばれるメソッド
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle) editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{
	if(editingStyle == UITableViewCellEditingStyleDelete){
		UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
		
		for(int i=0; i &lt; [fileList count]; i++){
			if([cell.textLabel.text isEqualToString:[fileList objectAtIndex:i]]){
				[fileList removeObjectAtIndex:i];
			}
		}
		
		NSMutableArray *array = [[NSMutableArray alloc] init];
		[array addObject:indexPath];
		[self.tableView deleteRowsAtIndexPaths:array withRowAnimation:UITableViewRowAnimationTop];
		
	}
}

// didSelectRowAtIndexPathはセルがタップされたらコールされる
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
	UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
	
	// セルがタップされたらAlertの画面を出す
	UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@&quot;File Selected&quot;
													message:[NSString stringWithFormat:@&quot;You selected the File '%@'&quot;, cell.textLabel.text]
												   delegate:nil 
										  cancelButtonTitle:nil
										  otherButtonTitles: @&quot;OK&quot;, nil];
	
	[alert show];
	
}
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return YES;
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)dealloc {
	[fileList release];
    [super dealloc];
}

@end
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">AppDelegateの編集</h2>
</div>
<p>最後にDelegateのソースですが、こちらも昨日と同様、基本的に作成したViewControllerをインスタンス化してwindowにsubviewとして貼付けてるだけです。</p>
<p><strong><em>TableDemoAppDelegate.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;

@class TableDemoViewController;

@interface TableDemoAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
    UIWindow *window;
	TableDemoViewController *viewController;
	UINavigationController *navigationController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet TableDemoViewController *viewController;

@end
</pre></p>
<p><strong><em>TableDemoAppDelegate.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;TableDemoAppDelegate.h&quot;
#import &quot;TableDemoViewController.h&quot;

@implementation TableDemoAppDelegate

@synthesize window;
@synthesize viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

	window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	
	viewController = [[TableDemoViewController alloc] init];
	navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
	
	[window addSubview:[navigationController view]];
	
    // Override point for customization after application launch	
    [window makeKeyAndVisible];
	
	return YES;
}

- (void)dealloc {
    [window release];
    [super dealloc];
}

@end
</pre></p>
<p>こんな風にでましたね〜</p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-09efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-09efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-27 23.11.09）" width="414" height="770" class="alignnone size-full wp-image-188" /></a></p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-18efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-18efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-27 23.11.18）" width="414" height="770" class="alignnone size-full wp-image-189" /></a></p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-27efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-27efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-27 23.11.27）" width="414" height="770" class="alignnone size-full wp-image-190" /></a></p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-37efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-37efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-27 23.11.37）" width="414" height="770" class="alignnone size-full wp-image-191" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=181&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/27/uitableviewcontroller%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-09efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-27 23.11.09）</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-18efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-27 23.11.18）</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-27efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-27 23.11.27）</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-27-23-11-37efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-27 23.11.37）</media:title>
		</media:content>
	</item>
		<item>
		<title>New York NOCを借りてみて</title>
		<link>http://clsmooth.wordpress.com/2010/04/26/new-york-noc%e3%82%92%e5%80%9f%e3%82%8a%e3%81%a6%e3%81%bf%e3%81%a6/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/26/new-york-noc%e3%82%92%e5%80%9f%e3%82%8a%e3%81%a6%e3%81%bf%e3%81%a6/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 15:39:29 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[雑感]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=185</guid>
		<description><![CDATA[New York NOCを借りて、SliceHostは解約しました。 ここで、自分が前にSliceHostを借りてやっていたことは 主にWordPressを使ったブログの公開でした。 でも、これが止まる、止まる。。。 それなりにアクセスもあったので、メモリ256Mで運用するには なかなかに問題があったのかもしれません。。。 自分がサーバを借りてやりたいことは 技術的なことを備忘録代わりのブログ ソースの保存（Subversion、Git、etc&#8230;） Photolog 新しい技術の実証実験 ですね。 そこで、自分の借りたサーバからアウトソーシングできることは アウトソーシングして行こうと言うことで切り出しました。 ブログ・・・wordpress.comでええやん ソース・・・GitHubでええやん と。 個人で借りれる格安のサーバって最終的には実証実験の場にしかならへんのかもね。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=185&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>New York NOCを借りて、SliceHostは解約しました。</p>
<p>ここで、自分が前にSliceHostを借りてやっていたことは<br />
主にWordPressを使ったブログの公開でした。</p>
<p>でも、これが止まる、止まる。。。</p>
<p>それなりにアクセスもあったので、メモリ256Mで運用するには<br />
なかなかに問題があったのかもしれません。。。</p>
<p>自分がサーバを借りてやりたいことは</p>
<ul>
<li>技術的なことを備忘録代わりのブログ</li>
<li>ソースの保存（Subversion、Git、etc&#8230;）</li>
<li>Photolog</li>
<li>新しい技術の実証実験</li>
</ul>
<p>ですね。</p>
<p>そこで、自分の借りたサーバからアウトソーシングできることは<br />
アウトソーシングして行こうと言うことで切り出しました。</p>
<ul>
<li>ブログ・・・wordpress.comでええやん</li>
<li>ソース・・・GitHubでええやん</li>
</ul>
<p>と。</p>
<p>個人で借りれる格安のサーバって最終的には実証実験の場にしかならへんのかもね。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=185&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/26/new-york-noc%e3%82%92%e5%80%9f%e3%82%8a%e3%81%a6%e3%81%bf%e3%81%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone 〜NavigationBarとSegmentationButtonを使ってみる〜</title>
		<link>http://clsmooth.wordpress.com/2010/04/25/iphone-%e3%80%9cnavigationbar%e3%81%a8segmentationbutton%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%9c/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/25/iphone-%e3%80%9cnavigationbar%e3%81%a8segmentationbutton%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%9c/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 04:59:31 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=172</guid>
		<description><![CDATA[今回はNavigationBarとSegmentation Buttonを使用してみます。 新規プロジェクトの作成 さてPageDemoという名前で「Windows-Based Application」で作成します。 そこでできたプロジェクト内のフォルダ「Classes」を選択し 「ファイル」→「新規ファイル」→「UIviewController subClass」を選択、RootViewControllerと名前を付けて保存します。 Interface Builderと分離はしておきます。 ViewControllerの編集 まずはViewControllerから編集をしていきます。 今回はRootViewControllerとCreditsViewControllerの2クラスを作成します。 RootViewControllerは画面そのもの、 CreditsViewControllerは画面からNavigation Bar上のcreditsのボタンを押した際に遷移する画面になります。 RootViewController.h RootViewController.m AppDelegateの編集 最後にDelegateのソースですが、こちらも昨日と同様、基本的に作成したViewControllerをインスタンス化してwindowにsubviewとして貼付けてるだけです。 PageDemoAppDelegate.h PageDemoAppDelegate.m ビルドして実行！ こんな感じのアプリが出来上がりましたね〜<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=172&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>今回はNavigationBarとSegmentation Buttonを使用してみます。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">新規プロジェクトの作成</h2>
</div>
<p>さてPageDemoという名前で「Windows-Based Application」で作成します。</p>
<p>そこでできたプロジェクト内のフォルダ「Classes」を選択し</p>
<p>「ファイル」→「新規ファイル」→「UIviewController subClass」を選択、RootViewControllerと名前を付けて保存します。</p>
<p>Interface Builderと分離はしておきます。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">ViewControllerの編集</h2>
</div>
<p>まずはViewControllerから編集をしていきます。<br />
今回はRootViewControllerとCreditsViewControllerの2クラスを作成します。</p>
<p>RootViewControllerは画面そのもの、</p>
<p>CreditsViewControllerは画面からNavigation Bar上のcreditsのボタンを押した際に遷移する画面になります。</p>
<p><strong><em>RootViewController.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;


@interface RootViewController : UIViewController {
	UITextView *textView;
	UIBarButtonItem *credits;
	UISegmentedControl *segmentedControl;
	UINavigationController *navigationController;
	int page;
}

-(void)setPage;
-(id)initWithAppDelegate:(id)appDelegate;

@end

@interface CreditsViewController : UIViewController
{
	UITextView *textView;
	UINavigationController *navigationController;
}

-(id)initWithAppDelegate:(id)appDelegate;

@end
</pre></p>
<p><strong><em>RootViewController.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;RootViewController.h&quot;
#import &quot;PageDemoAppDelegate.h&quot;


@implementation RootViewController

-(id)initWithAppDelegate:(id)appDelegate{
	self = [super init];
	if(self != nil){
		// クレジットボタンを作成、押されたらcreditsメソッドを呼ぶ
		credits = [[[UIBarButtonItem alloc]
									initWithTitle:@&quot;Credits&quot; 
									style:UIBarButtonItemStylePlain 
									target:appDelegate 
									action:@selector(credits)] autorelease];
		
		// navigation Barの右側にボタンを配置
		self.navigationItem.rightBarButtonItem = credits;
		
		// segmentationControlを作成
		segmentedControl = [[UISegmentedControl alloc] initWithItems:nil];
		segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
		
		// Bunnies(ボタンのINDEX=0)とPonies(ボタンのINDEX=1)のボタンを作成
		[segmentedControl insertSegmentWithTitle:@&quot;Bunnies&quot; atIndex:0 animated:NO];
		[segmentedControl insertSegmentWithTitle:@&quot;Ponnies&quot; atIndex:1 animated:NO];
		
		// 今選択されているボタンと異なるものを選択されたらcontrolPressedメソッドを呼ぶ
		[segmentedControl addTarget:self action:@selector(controlPressed:) forControlEvents:UIControlEventValueChanged];
		
		// Navigation Barのタイトル部分にSegmentation Buttonを配置する
		self.navigationItem.titleView = segmentedControl;
		
		// 画面起動時にはBunniesが押されている状態にする
		segmentedControl.selectedSegmentIndex = 0;
	}
	
	return self;
}

-(void)controlPressed:(id) sender{
	// setPageメソッドを呼ぶ
	[self setPage];
}

-(void)setPage{
	// 押されたボタンのINDEXを取得
	int index = segmentedControl.selectedSegmentIndex;
	
	if(index == 0){      // Bunnies(ボタンのINDEX=0)が押されてたら
		textView.text = @&quot;OMG Bunnies!&quot;;
	}else{               // Ponies(ボタンのINDEX=1)が押されてたら
		textView.text = @&quot;OMG Ponies!&quot;;
	}
}

- (void)loadView {
	CGRect bounds = [[UIScreen mainScreen] applicationFrame];
	
	[super loadView];
	
	textView = [[UITextView alloc] initWithFrame:bounds];
	textView.editable = NO;
	
	[self setPage];
	self.view = textView;
	
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (void)dealloc {
	[textView release];
    [super dealloc];
}

@end

@implementation CreditsViewController

-(id)initWithAppDelegate:(id)appDelegate{
	self = [super init];
	
	// Backボタンを作成する。押されたらbackメソッドを呼ぶ
	if(self != nil){
		UIBarButtonItem *back = [[[UIBarButtonItem alloc]
												initWithTitle:@&quot;back&quot; 
												style:UIBarButtonItemStylePlain 
												target:appDelegate 
								  action:@selector(back)] autorelease];
		
		// NavigationBarのBack Buttonとして登録する
		self.navigationItem.backBarButtonItem = back;
	}
	
	return self;
}

-(void)loadView{
	[super loadView];
	
	textView = [[UITextView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
	textView.editable = NO;
	
	textView.text = @&quot;iPhone SDK Application Development\n&quot;
	&quot;Copyright (c) 2008, O'Reilly Media&quot;;
	
	self.view = textView;
}

- (void)dealloc {
	[textView release];
    [super dealloc];
}

@end

</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">AppDelegateの編集</h2>
</div>
<p>最後にDelegateのソースですが、こちらも昨日と同様、基本的に作成したViewControllerをインスタンス化してwindowにsubviewとして貼付けてるだけです。</p>
<p><strong><em>PageDemoAppDelegate.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;
#import &quot;RootViewController.h&quot;

@interface PageDemoAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
	UIWindow *window;
	RootViewController *viewController;
	CreditsViewController *creditsViewController;
	UINavigationController *navigationController;
	
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet RootViewController *viewController;
@property (nonatomic, retain) IBOutlet CreditsViewController *creditsViewController;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;

@end
</pre></p>
<p><strong><em>PageDemoAppDelegate.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;PageDemoAppDelegate.h&quot;
#import &quot;RootViewController.h&quot;

@implementation PageDemoAppDelegate

@synthesize window;
@synthesize viewController;
@synthesize creditsViewController;
@synthesize navigationController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Override point for customization after application launch
	window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	
	viewController = [[RootViewController alloc] initWithAppDelegate:self];
	creditsViewController = [[CreditsViewController alloc] initWithAppDelegate:self];
	navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
	
	[window addSubview:[navigationController view]];
	
    [window makeKeyAndVisible];
	
	return YES;
}


- (void)dealloc {
	[navigationController release];
	[viewController release];
	[creditsViewController release];	
    [window release];
    [super dealloc];
}

-(void) credits{
	// 次画面に遷移する際には、navigationControllerのpushViewControllerを使う
	[navigationController pushViewController:creditsViewController animated:YES];
}

-(void) back{
	// 前画面に遷移する際には、navigationControllerのpopViewControllerAnimatedを使う
	[navigationController popViewControllerAnimated:YES];
}

@end
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">ビルドして実行！</h2>
</div>
<p>こんな感じのアプリが出来上がりましたね〜</p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-21efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-21efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-25 13.56.21）" width="414" height="770" class="alignnone size-full wp-image-174" /></a></p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-26efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-26efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-25 13.56.26）" width="414" height="770" class="alignnone size-full wp-image-175" /></a></p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-31efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-31efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-25 13.56.31）" width="414" height="770" class="alignnone size-full wp-image-176" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=172&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/25/iphone-%e3%80%9cnavigationbar%e3%81%a8segmentationbutton%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%9c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-21efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-25 13.56.21）</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-26efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-25 13.56.26）</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-25-13-56-31efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-25 13.56.31）</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone 〜UITextViewを使用する〜</title>
		<link>http://clsmooth.wordpress.com/2010/04/24/iphone-%e3%80%9cuitextview%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e3%80%9c/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/24/iphone-%e3%80%9cuitextview%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e3%80%9c/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 05:56:52 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=168</guid>
		<description><![CDATA[前回はViewControllerを使用して画面を出力する部分を確認したので、 今回はUITextViewを使ってHTMLソースを表示するものを作ってみま〜す。 新規プロジェクトの作成 SourceReaderという名前で「Windows-Based Application」で作成します。 そこでできたプロジェクト内のフォルダ「Classes」を選択し 「ファイル」→「新規ファイル」→「UIviewController subClass」を選択し、SourceReaderViewControllerと名前を付けて保存します。 Interface Builderと分離はしておきます。 ViewControllerの編集 まずはViewControllerから編集をしていきます。 SourceReaderViewController.h SourceReaderViewController.m コメントに細かく動作を書いておいたので、感じはつかめるかと思います。 AppDelegateの編集 次にAppDelegateの編集です。 基本的に作成したViewControllerをインスタンス化して windowにsubviewとして貼付けてるだけです。 SourceReaderAppdelegate.h SourceReaderAppdelegate.m さぁビルドして実行！！！ これでビルドして実行してみるとこんな感じになりますね〜！<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=168&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>前回はViewControllerを使用して画面を出力する部分を確認したので、<br />
今回はUITextViewを使ってHTMLソースを表示するものを作ってみま〜す。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">新規プロジェクトの作成</h2>
</div>
<p>SourceReaderという名前で「Windows-Based Application」で作成します。</p>
<p>そこでできたプロジェクト内のフォルダ「Classes」を選択し</p>
<p>「ファイル」→「新規ファイル」→「UIviewController subClass」を選択し、SourceReaderViewControllerと名前を付けて保存します。</p>
<p>Interface Builderと分離はしておきます。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">ViewControllerの編集</h2>
</div>
<p>まずはViewControllerから編集をしていきます。<br />
<strong><br />
<em>SourceReaderViewController.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;

@interface SourceReaderViewController : UIViewController {
	UITextView *textView;
}

@end
</pre></p>
<p><strong><br />
<em>SourceReaderViewController.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;SourceReaderViewController.h&quot;

@implementation SourceReaderViewController

-(id) init{
	self = [super init];
	if(self != nil){
		// 今回は何もしない
	}
	
	return self;
}

- (void)loadView {
	CGRect bounds = [[UIScreen mainScreen] applicationFrame];
	[super loadView];
	
	// UITextViewをインスタンス化して初期化
	textView = [[UITextView alloc] initWithFrame:bounds];
	
	// UIColorオブジェクトで青を定義する
	UIColor *myBlue = [UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:1.0];
	
	// textViewのテキストカラーを青に設定する
	textView.textColor = myBlue;
	
	// UIFontオブジェクトでフォントを定義する
	UIFont *myfixed = [UIFont fontWithName:@&quot;Courier New&quot; size:10.0];
	
	// textViewにフォントを設定する
	textView.font = myfixed;
	
	// このtextViewにタップしてもキーボードをださないようにする
	textView.editable = NO;
	
	// URLを指定して、WEBサイトのHTMLソースをtextViewに表示する
	NSURL *url = [NSURL URLWithString:@&quot;http://www.oreilly.com&quot;];
	NSString *pageData = [NSString stringWithContentsOfURL:url];
	textView.text = pageData;
	
	self.view = textView;
}

- (void)didReceiveMemoryWarning { 
    [super didReceiveMemoryWarning];    
}

- (void)viewDidUnload {
    [super viewDidUnload];
} 

- (void)dealloc {
	[textView release];
    [super dealloc];
}	
</pre></p>
<p>コメントに細かく動作を書いておいたので、感じはつかめるかと思います。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">AppDelegateの編集</h2>
</div>
<p>次にAppDelegateの編集です。</p>
<p>基本的に作成したViewControllerをインスタンス化して</p>
<p>windowにsubviewとして貼付けてるだけです。</p>
<p><strong><br />
<em>SourceReaderAppdelegate.h</em></strong></p>
<p><pre class="brush: objc;">
#import &lt;UIKit/UIKit.h&gt;

@class SourceReaderViewController;

@interface SourceReaderAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
    UIWindow *window;
	SourceReaderViewController *viewController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet SourceReaderViewController *viewController;

@end
</pre></p>
<p><strong><br />
<em>SourceReaderAppdelegate.m</em></strong></p>
<p><pre class="brush: objc;">
#import &quot;SourceReaderAppDelegate.h&quot;
#import &quot;SourceReaderViewController.h&quot;

@implementation SourceReaderAppDelegate

@synthesize window;
@synthesize viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Override point for customization after application launch
	CGRect screenBounds = [[UIScreen mainScreen] bounds];
	self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease];
	
	viewController = [[SourceReaderViewController alloc] init];
	
	[window addSubview:viewController.view];
	
    [window makeKeyAndVisible];
	
	return YES;
}

- (void)dealloc {
	[viewController release];
    [window release];
    [super dealloc];
}

@end
</pre></p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">さぁビルドして実行！！！</h2>
</div>
<p>これでビルドして実行してみるとこんな感じになりますね〜！</p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-24-14-54-57efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-24-14-54-57efbc89.png?w=414&#038;h=770" alt="" title="スクリーンショット（2010-04-24 14.54.57）" width="414" height="770" class="alignnone size-full wp-image-169" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=168&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/24/iphone-%e3%80%9cuitextview%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e3%80%9c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-24-14-54-57efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-24 14.54.57）</media:title>
		</media:content>
	</item>
		<item>
		<title>GitHubを使ってみた(2)</title>
		<link>http://clsmooth.wordpress.com/2010/04/23/github%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f2/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/23/github%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f2/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 15:52:22 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[GitHub]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=165</guid>
		<description><![CDATA[前回はリポジトリへソースをコミットするまでを追ってたけど、 今回はリポジトリからソースを取得するところをやってみます。 リポジトリからソースを取得する まず、ここを参考にして、SSH Keyを登録しておく。 チェックアウトしたいディレクトリに移動し、下記のコマンドを投入する。 これで自分のPCにリポジトリが複製された〜。 ここでローカルのPCで編集、保存した後はローカルのリポジトリ(master)にコミットします。 そしてリモートリポジトリにコミットします。 これで基本的な使い方はマスター！！！ でも分散リポジトリってちょっととっかかりがややこしいな〜<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=165&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>前回はリポジトリへソースをコミットするまでを追ってたけど、<br />
今回はリポジトリからソースを取得するところをやってみます。</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">リポジトリからソースを取得する</h2>
</div>
<p>まず、<a href="http://help.github.com/mac-key-setup/">ここ</a>を参考にして、SSH Keyを登録しておく。</p>
<p>チェックアウトしたいディレクトリに移動し、下記のコマンドを投入する。</p>
<p><pre class="brush: plain;">
# git clone git@github.com:(UserName)/DemoController.git
Initialized empty Git repository in /Path/to/DemoController/.git/
remote: Counting objects: 57, done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 57 (delta 10), reused 0 (delta 0)
Receiving objects: 100% (57/57), 500.58 KiB | 179 KiB/s, done.
Resolving deltas: 100% (10/10), done.
</pre></p>
<p>これで自分のPCにリポジトリが複製された〜。</p>
<p>ここでローカルのPCで編集、保存した後はローカルのリポジトリ(master)にコミットします。</p>
<p><pre class="brush: plain;">
# git commit -a -m 'second commit'
[master 6ed3193] second commit
 15 files changed, 3088 insertions(+), 2635 deletions(-)
 rewrite build/ControllerDemo.build/ControllerDemo.pbxindex/categories.pbxbtree (71%)
:
:
</pre></p>
<p>そしてリモートリポジトリにコミットします。</p>
<p><pre class="brush: plain;">
# git push origin masterCounting objects: 45, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (23/23), 317.68 KiB, done.
Total 23 (delta 14), reused 0 (delta 0)
To git@github.com:(UserName)/DemoController.git
   15583a3..6ed3193  master -&gt; master
</pre></p>
<p>これで基本的な使い方はマスター！！！</p>
<p>でも分散リポジトリってちょっととっかかりがややこしいな〜</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/165/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=165&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/23/github%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>
	</item>
		<item>
		<title>GitHubを使ってみた</title>
		<link>http://clsmooth.wordpress.com/2010/04/22/github%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f/</link>
		<comments>http://clsmooth.wordpress.com/2010/04/22/github%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 14:33:41 +0000</pubDate>
		<dc:creator>CLSmooth</dc:creator>
				<category><![CDATA[GitHub]]></category>

		<guid isPermaLink="false">http://clsmooth.wordpress.com/?p=150</guid>
		<description><![CDATA[ソースの保管場所として自前でSubversionを立ててたりしたけど、 サーバのリソースももったい無かったりするし、 これからはGitHubに移行しようと言う事でGitHubを使ってみた！！！ GitHubの使い方 GitHubにログインし、このボタンをポチッとなとします。 そうするとこのような画面が出るので、適当なProjectNameを入力してCreate Repositoryを押します。 できたら、画面上で色々教えてもらえるので、その通りにやっていきましょう。 まずはGitHubを初めて使う際にこのように設定を行います。 その後、GitHubにアップするソースのルートディレクトリに移り、下記のコマンドを実行し、リポジトリを初期化します その後、ローカルのリポジトリに下記のコマンドでアップし、コミットします。 その後、ローカルのmasterリポジトリからサーバ上のoriginリポジトリへアップします。 わーい、これでアップできました〜<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=150&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>ソースの保管場所として自前でSubversionを立ててたりしたけど、<br />
サーバのリソースももったい無かったりするし、<br />
これからはGitHubに移行しようと言う事でGitHubを使ってみた！！！</p>
<div style="border-left:#FFCC00 solid 7px;height:40px;">
<h2 style="padding:.9em .4em 0;">GitHubの使い方</h2>
</div>
<p>GitHubにログインし、このボタンをポチッとなとします。</p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-22-23-03-06efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-22-23-03-06efbc89.png?w=351&#038;h=63" alt="" title="スクリーンショット（2010-04-22 23.03.06）" width="351" height="63" class="alignnone size-full wp-image-151" /></a></p>
<p>そうするとこのような画面が出るので、適当なProjectNameを入力してCreate Repositoryを押します。</p>
<p><a href="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-22-23-20-23efbc89.png"><img src="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-22-23-20-23efbc89.png?w=300&#038;h=162" alt="" title="スクリーンショット（2010-04-22 23.20.23）" width="300" height="162" class="alignnone size-medium wp-image-153" /></a></p>
<p>できたら、画面上で色々教えてもらえるので、その通りにやっていきましょう。</p>
<p>まずはGitHubを初めて使う際にこのように設定を行います。</p>
<p><pre class="brush: plain;">
# git config --global user.name &quot;Your Name&quot;
# git config --global user.email &quot;Your Email Address&quot;
</pre></p>
<p>その後、GitHubにアップするソースのルートディレクトリに移り、下記のコマンドを実行し、リポジトリを初期化します</p>
<p><pre class="brush: plain;">
# git init
Initialized empty Git repository in /Users/tryout/Documents/XCode/ControllerDemo/.git/
</pre></p>
<p>その後、ローカルのリポジトリに下記のコマンドでアップし、コミットします。</p>
<p><pre class="brush: plain;">
# git add .
# git commit -m 'first commit'[master (root-commit) 15583a3] first commit
 40 files changed, 2636 insertions(+), 0 deletions(-)
 create mode 100644 Classes/ControllerDemoAppDelegate.h
 create mode 100644 Classes/ControllerDemoAppDelegate.m
 create mode 100644 Classes/ControllerDemoViewController.h
 create mode 100644 Classes/ControllerDemoViewController.m
 create mode 100644 ControllerDemo-Info.plist
 create mode 100755 ControllerDemo.xcodeproj/project.pbxproj
 create mode 100644 ControllerDemo.xcodeproj/tryout.mode1v3
 create mode 100644 ControllerDemo.xcodeproj/tryout.pbxuser
 create mode 100644 ControllerDemo_Prefix.pch
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/categories.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/cdecls.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/decls.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/files.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/imports.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/pbxindex.header
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/protocols.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/refs.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/strings.pbxstrings/control
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/strings.pbxstrings/strings
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/subclasses.pbxbtree
 create mode 100644 build/ControllerDemo.build/ControllerDemo.pbxindex/symbols0.pbxsymbols
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo-all-target-headers.hmap
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo-generated-files.hmap
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo-own-target-headers.hmap
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo-project-headers.hmap
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo.dep
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo.hmap
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/ControllerDemo~.dep
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/Objects-normal/i386/ControllerDemo.LinkFileList
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/Objects-normal/i386/ControllerDemoAppDelegate.o
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/Objects-normal/i386/ControllerDemoViewController.o
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/Objects-normal/i386/main.o
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/build-state.dat
 create mode 100644 build/ControllerDemo.build/Debug-iphonesimulator/ControllerDemo.build/build-state~.dat
 create mode 100644 build/Debug-iphonesimulator/ControllerDemo.app.dSYM/Contents/Info.plist
 create mode 100644 build/Debug-iphonesimulator/ControllerDemo.app.dSYM/Contents/Resources/DWARF/ControllerDemo
 create mode 100755 build/Debug-iphonesimulator/ControllerDemo.app/ControllerDemo
 create mode 100644 build/Debug-iphonesimulator/ControllerDemo.app/Info.plist
 create mode 100644 build/Debug-iphonesimulator/ControllerDemo.app/PkgInfo
 create mode 100644 main.m
</pre></p>
<p>その後、ローカルのmasterリポジトリからサーバ上のoriginリポジトリへアップします。</p>
<p><pre class="brush: plain;">
# git remote add origin git@github.com:UserName/DemoController.git
# git push origin master
Counting objects: 57, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (50/50), done.
Writing objects: 100% (57/57), 516.89 KiB, done.
Total 57 (delta 9), reused 0 (delta 0)
To git@github.com:UserName/DemoController.git
 * [new branch]     master -&gt; master
</pre></p>
<p>わーい、これでアップできました〜</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/clsmooth.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/clsmooth.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/clsmooth.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/clsmooth.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/clsmooth.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/clsmooth.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/clsmooth.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/clsmooth.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=clsmooth.wordpress.com&amp;blog=7086566&amp;post=150&amp;subd=clsmooth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://clsmooth.wordpress.com/2010/04/22/github%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/742359b4a64788ea0c8427a48f974709?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">g2-742359b4a64788ea0c8427a48f974709</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-22-23-03-06efbc89.png" medium="image">
			<media:title type="html">スクリーンショット（2010-04-22 23.03.06）</media:title>
		</media:content>

		<media:content url="http://clsmooth.files.wordpress.com/2010/04/e382b9e382afe383aae383bce383b3e382b7e383a7e38383e38388efbc882010-04-22-23-20-23efbc89.png?w=300" medium="image">
			<media:title type="html">スクリーンショット（2010-04-22 23.20.23）</media:title>
		</media:content>
	</item>
	</channel>
</rss>
