[from now] 2012/09/02 02:58:31

diff --git a/skooma/CCAppDelegate.h b/skooma/CCAppDelegate.h
index c960322..b2203f4 100644
--- a/skooma/CCAppDelegate.h
+++ b/skooma/CCAppDelegate.h
@@ -27,7 +27,7 @@

-@interface COColor : NSObject
+@interface CCColor : NSObject

 @property (nonatomic) UIColor *clear;
 @property (nonatomic) UIColor *white;
@@ -37,13 +37,21 @@
 @property (nonatomic) UIColor *black;
 @property (nonatomic) UIColor *smoke;

+@property (nonatomic) UIColor *time;
+@property (nonatomic) UIColor *title;
+@property (nonatomic) UIColor *name;
+@property (nonatomic) UIColor *mail;
+@property (nonatomic) UIColor *resCount;
+@property (nonatomic) UIColor *text;
+@property (nonatomic) UIColor *quote;
+
 @end

-@interface COSound : NSObject
+@interface CCSound : NSObject

 @end

@@ -51,7 +59,7 @@

-@interface COIcon : NSObject
+@interface CCIcon : NSObject

 @property (nonatomic) UIImage *reload;

@@ -64,9 +72,9 @@
 #pragma mark - extern

 extern CCAppDelegate *app;
-extern COColor *color;
-extern COSound *sound;
-extern COIcon  *icon;
+extern CCColor *color;
+extern CCSound *sound;
+extern CCIcon  *icon;

diff --git a/skooma/CCAppDelegate.m b/skooma/CCAppDelegate.m
index 1a7304c..350a1f9 100644
--- a/skooma/CCAppDelegate.m
+++ b/skooma/CCAppDelegate.m
@@ -8,13 +8,22 @@

 #import "CCAppDelegate.h"

-@implementation CCAppDelegate
+CCAppDelegate   *app = nil;
+CCColor         *color = nil;
+CCSound         *sound = nil;
+CCIcon          *icon = nil;

+@implementation CCAppDelegate

 - (id)init
 {
     self = [super init];
     if (self) {
+        app   = self;
+        color = [CCColor new];
+        sound = [CCSound new];
+        icon  = [CCIcon new];
+
         _rect = [[UIScreen mainScreen] bounds];
     }
     return self;
@@ -33,12 +42,12 @@
     label.font = [UIFont fontWithName:@"azuki_font" size:60];
     label.text = @"あいうえおかきくけこ";
     [_window addSubview:label];
-
+
 //    NSURL *url = [NSURL URLWithString:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=100x100x256"];
-    NSURL *url = [NSURL URLWithString:@"http://img.2chan.net/b/res/163322977.htm"];
+//    NSURL *url = [NSURL URLWithString:@"http://img.2chan.net/b/res/163322977.htm"];
 //    NSURL *url = [NSURL URLWithString:@"http://img.2chan.net/b/res/163316390.htm"];
 //    NSURL *url = [NSURL URLWithString:@"http://img.2chan.net/b/res/163316080.htm"];
-
+
 //    if (!error) {
 //        NSString *response = [request responseString];
 //        NSLog(@"%@", response);
@@ -48,16 +57,16 @@
 //    }
 //    NSDictionary *headers = [request responseHeaders];
 //    NSLog(@"%@", [headers objectForKey:@"Status"]);
-
+
 //    NSString *response = [request responseString];
 //    NSLog(@"%@", response);
-
-
-
+
+
+
 //    // スクレイピング
 //    NSString *pattern;
 //    NSError *error;
-//
+//
 //    // カタログスクレイピング
 //    pattern = @"<a.*?res/([0-9]*?).htm.*?><img src='(.*?)'.*?<small>(.*?)</small>.*?<font size=2>([0-9]*?)</font>";
 //    error = nil;
@@ -76,7 +85,7 @@
 //        };
 //        [regexp enumerateMatchesInString:response options:0 range:NSMakeRange(0, response.length) usingBlock:block];
 //    }
-
+
 //    // スレッドスクレイピング
 //    pattern = @"input.*?<blockquote.*?>(.*?)</blockquote><(.*?)>";
 //    NSError *error = nil;
@@ -99,10 +108,10 @@
 //        @finally {
 //        }
 //    }
-
-
-
-
+
+
+
+
     ////////////////////////////////////////////////////////////////////////////////
 //    UIViewController *rootViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil];
 //    [self.window addSubview:rootViewController.view];
@@ -145,7 +154,7 @@

-@implementation COColor
+@implementation CCColor

 - (id)init
 {
@@ -157,6 +166,48 @@
         _darkGray  = [UIColor darkGrayColor];
         _black     = [UIColor blackColor];
         _smoke     = [UIColor colorWithWhite:0.00 alpha:0.50];
+
+        _time       = [UIColor colorWithRed:0.75 green:0.50 blue:0.43 alpha:1];
+        _title      = [UIColor colorWithRed:0.82 green:0.06 blue:0.02 alpha:1];
+        _name       = [UIColor colorWithRed:0.06 green:0.44 blue:0.25 alpha:1];
+        _mail       = [UIColor colorWithRed:0.00 green:0.00 blue:0.80 alpha:1];
+        _resCount   = [UIColor colorWithRed:0.06 green:0.44 blue:0.25 alpha:1];
+        _text       = [UIColor colorWithRed:0.50 green:0.00 blue:0.00 alpha:1];
+        _quote      = [UIColor colorWithRed:0.47 green:0.60 blue:0.13 alpha:1];
+    }
+    return self;
+}
+
+@end
+
+
+
+
+
+@implementation CCSound
+
+- (id)init
+{
+    self = [super init];
+    if (self) {
+
+    }
+    return self;
+}
+
+@end
+
+
+
+
+
+@implementation CCIcon
+
+- (id)init
+{
+    self = [super init];
+    if (self) {
+
     }
     return self;
 }
diff --git a/skooma/CCThreadCell.h b/skooma/CCThreadCell.h
index bfd74ed..f495aab 100644
--- a/skooma/CCThreadCell.h
+++ b/skooma/CCThreadCell.h
@@ -10,4 +10,6 @@

 @interface CCThreadCell : UITableViewCell

+@property (nonatomic) CCThread *thread;
+
 @end
diff --git a/skooma/CCThreadCell.m b/skooma/CCThreadCell.m
index 47a5c71..77eed42 100644
--- a/skooma/CCThreadCell.m
+++ b/skooma/CCThreadCell.m
@@ -6,6 +6,7 @@
 //
 //

+#import "CCAppDelegate.h"
 #import "CCThreadCell.h"

 @implementation CCThreadCell
@@ -26,4 +27,31 @@
     // Configure the view for the selected state
 }

+//- (void)drawRect:(CGRect)rect
+//{
+//    UIFont *font = [UIFont fontWithName:@"azuki_font" size:15];
+//
+//    [color.black set];
+////    [[UIColor blackColor] set];
+//    [[NSString stringWithFormat:@"%d レス", _thread.resCount] drawInRect:CGRectMake(0, 0, 320, 60) withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentLeft];
+//
+////    [color.title set];
+////    [_thread.title drawInRect:_thread.titleRect withFont:boldFont];
+//
+////	s = thread.name;
+////	if (![s isEqualToString:@""]) {
+////		[nameColor set];
+////		[s drawInRect:thread.nameRect withFont:boldFont];
+////	}
+////
+////	s = thread.mail;
+////	if (![s isEqualToString:@""]) {
+////		[mailColor set];
+////		[s drawInRect:thread.mailRect withFont:boldFont];
+////	}
+////
+////    [color.resCount set];
+////    [[NSString stringWithFormat:@"%d レス", _thread.resCount] drawInRect:_thread.resCountRect withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentRight];
+//}
+
 @end
diff --git a/skooma/CCThreadViewController.m b/skooma/CCThreadViewController.m
index 405fe40..d8f6d6f 100644
--- a/skooma/CCThreadViewController.m
+++ b/skooma/CCThreadViewController.m
@@ -38,9 +38,8 @@
 - (void)viewDidLoad
 {
     [super viewDidLoad];
-
-    // Uncomment the following line to preserve selection between presentations.
-    // self.clearsSelectionOnViewWillAppear = NO;
+
+    _threads = [NSMutableArray new];

     CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=100x100x256"];
     _connection = [NSURLConnection connectionWithRequest:request delegate:self];
@@ -71,13 +70,18 @@

 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
+    NSLog(@"count ------------> %d", [_threads count]);
     return [_threads count];
 }

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
+//    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
     CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
-
+    cell.thread = [_threads objectAtIndex:indexPath.row];
+//    CCThreadCell *cell = [[CCThreadCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil];
+//    cell.thread = [_threads objectAtIndex:indexPath.row];
+
     // Configure the cell...

     return cell;
@@ -117,11 +121,10 @@

 - (void)connectionDidFinishLoading:(NSURLConnection *)connection
 {
-    [connection cancel];
+//    [connection cancel];

     if (_response.statusCode == 200) {
         [self scrape];
-
     }
 }

@@ -144,7 +147,7 @@
     }
     // TODO 例外処理をつける
     [regexp enumerateMatchesInString:string options:0 range:NSMakeRange(0, string.length) usingBlock:^(NSTextCheckingResult *match, NSMatchingFlags flag, BOOL *stop) {
-//        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:1]]);
+        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:1]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:2]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:3]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:4]]);
@@ -153,7 +156,11 @@
         thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
         thread.text      = [string substringWithRange:[match rangeAtIndex:3]];
         thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
+        [_threads addObject:thread];
     }];
+
+    [self.tableView reloadData];
+    [self.tableView setNeedsDisplay];
 }
[from now] 2012/09/02 03:44:03

diff --git a/skooma/CCAppDelegate.m b/skooma/CCAppDelegate.m
index 350a1f9..3733c10 100644
--- a/skooma/CCAppDelegate.m
+++ b/skooma/CCAppDelegate.m
@@ -115,9 +115,11 @@ CCIcon          *icon = nil;
     ////////////////////////////////////////////////////////////////////////////////
 //    UIViewController *rootViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil];
 //    [self.window addSubview:rootViewController.view];
-    CCThreadViewController *threadViewController = [[CCThreadViewController alloc] initWithNibName:nil bundle:nil];
+//    CCThreadViewController *threadViewController = [[CCThreadViewController alloc] initWithNibName:nil bundle:nil];
+    CCThreadViewController *threadViewController = [[CCThreadViewController alloc] initWithStyle:UITableViewStylePlain];
     [self.window addSubview:threadViewController.view];
     [self.window makeKeyAndVisible];
+
     return YES;
 }

diff --git a/skooma/CCThreadViewController.m b/skooma/CCThreadViewController.m
index d8f6d6f..8a2b432 100644
--- a/skooma/CCThreadViewController.m
+++ b/skooma/CCThreadViewController.m
@@ -40,10 +40,13 @@
     [super viewDidLoad];

     _threads = [NSMutableArray new];
-
-    CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=100x100x256"];
-    _connection = [NSURLConnection connectionWithRequest:request delegate:self];
-    _buffer = [NSMutableData new];
+
+    [self.tableView reloadData];
+
+////    CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=100x100x256"];
+//    CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=5x5x256"];
+//    _connection = [NSURLConnection connectionWithRequest:request delegate:self];
+//    _buffer = [NSMutableData new];
 }

 - (void)viewDidUnload
@@ -71,19 +74,28 @@
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
     NSLog(@"count ------------> %d", [_threads count]);
-    return [_threads count];
+//    return [_threads count];
+    return 3;
 }

-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
-{
+//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+//{
+////    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
 //    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
-    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
-    cell.thread = [_threads objectAtIndex:indexPath.row];
-//    CCThreadCell *cell = [[CCThreadCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil];
 //    cell.thread = [_threads objectAtIndex:indexPath.row];
-
-    // Configure the cell...
+////    CCThreadCell *cell = [[CCThreadCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil];
+////    cell.thread = [_threads objectAtIndex:indexPath.row];
+//
+//    // Configure the cell...
+//
+//    return cell;
+//}

+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    static NSString *CellIdentifier = @"Cell";
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+
     return cell;
 }

@@ -91,6 +103,7 @@

+
 #pragma mark - Table view delegate

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
@@ -98,6 +111,10 @@

 }

+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
+{
+    return 60;
+}

@@ -121,8 +138,9 @@

 - (void)connectionDidFinishLoading:(NSURLConnection *)connection
 {
-//    [connection cancel];
-
+    [connection cancel];
+    connection = nil;
+
     if (_response.statusCode == 200) {
         [self scrape];
     }
@@ -147,15 +165,15 @@
     }
     // TODO 例外処理をつける
     [regexp enumerateMatchesInString:string options:0 range:NSMakeRange(0, string.length) usingBlock:^(NSTextCheckingResult *match, NSMatchingFlags flag, BOOL *stop) {
-        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:1]]);
+//        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:1]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:2]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:3]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:4]]);
         CCThread *thread = [CCThread new];
         thread.number    = [[string substringWithRange:[match rangeAtIndex:1]] intValue];
-        thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
-        thread.text      = [string substringWithRange:[match rangeAtIndex:3]];
-        thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
+//        thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
+//        thread.text      = [string substringWithRange:[match rangeAtIndex:3]];
+//        thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
         [_threads addObject:thread];
     }];
[from now] 2012/09/02 17:11:49

diff --git a/skooma.xcodeproj/project.pbxproj b/skooma.xcodeproj/project.pbxproj
index f0d39eb..3e6f952 100644
--- a/skooma.xcodeproj/project.pbxproj
+++ b/skooma.xcodeproj/project.pbxproj
@@ -8,7 +8,6 @@

 /* Begin PBXBuildFile section */
 		4221382715F24D990088B119 /* CCThreadCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221382615F24D990088B119 /* CCThreadCell.m */; };
-		4221382F15F24FF00088B119 /* CCURLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4221382E15F24FF00088B119 /* CCURLRequest.m */; };
 		4228EB4315E40E6F00816559 /* azuki.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4228EB4215E40E6F00816559 /* azuki.ttf */; };
 		4228EB6F15E5304100816559 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 4228EB6615E5304100816559 /* Reachability.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
 		426516EB15E3F71C00B36104 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 426516EA15E3F71C00B36104 /* UIKit.framework */; };
@@ -17,6 +16,8 @@
 		426516F515E3F71C00B36104 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 426516F315E3F71C00B36104 /* InfoPlist.strings */; };
 		426516F715E3F71C00B36104 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 426516F615E3F71C00B36104 /* main.m */; };
 		426516FB15E3F71C00B36104 /* CCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 426516FA15E3F71C00B36104 /* CCAppDelegate.m */; };
+		4275125E15F3493B0025B046 /* NSURLRequest+Custom.m in Sources */ = {isa = PBXBuildFile; fileRef = 4275125D15F3493B0025B046 /* NSURLRequest+Custom.m */; };
+		4275126115F3495C0025B046 /* UIView+Custom.m in Sources */ = {isa = PBXBuildFile; fileRef = 4275126015F3495C0025B046 /* UIView+Custom.m */; };
 		42B6C7D915F2248700C80CC4 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42B6C7D815F2248700C80CC4 /* SystemConfiguration.framework */; };
 		42B6C7E215F2297100C80CC4 /* CCThreadViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42B6C7E115F2297100C80CC4 /* CCThreadViewController.m */; };
 		42B6C7E515F22A3400C80CC4 /* CCThread.m in Sources */ = {isa = PBXBuildFile; fileRef = 42B6C7E415F22A3400C80CC4 /* CCThread.m */; };
@@ -25,8 +26,6 @@
 /* Begin PBXFileReference section */
 		4221382515F24D990088B119 /* CCThreadCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCThreadCell.h; sourceTree = "<group>"; };
 		4221382615F24D990088B119 /* CCThreadCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCThreadCell.m; sourceTree = "<group>"; };
-		4221382D15F24FF00088B119 /* CCURLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCURLRequest.h; sourceTree = "<group>"; };
-		4221382E15F24FF00088B119 /* CCURLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCURLRequest.m; sourceTree = "<group>"; };
 		4228EB4215E40E6F00816559 /* azuki.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = azuki.ttf; sourceTree = "<group>"; };
 		4228EB6515E5304100816559 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; };
 		4228EB6615E5304100816559 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
@@ -40,6 +39,10 @@
 		426516F815E3F71C00B36104 /* skooma-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "skooma-Prefix.pch"; sourceTree = "<group>"; };
 		426516F915E3F71C00B36104 /* CCAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CCAppDelegate.h; sourceTree = "<group>"; };
 		426516FA15E3F71C00B36104 /* CCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CCAppDelegate.m; sourceTree = "<group>"; };
+		4275125C15F3493B0025B046 /* NSURLRequest+Custom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSURLRequest+Custom.h"; sourceTree = "<group>"; };
+		4275125D15F3493B0025B046 /* NSURLRequest+Custom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSURLRequest+Custom.m"; sourceTree = "<group>"; };
+		4275125F15F3495C0025B046 /* UIView+Custom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Custom.h"; sourceTree = "<group>"; };
+		4275126015F3495C0025B046 /* UIView+Custom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Custom.m"; sourceTree = "<group>"; };
 		42B6C7D815F2248700C80CC4 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
 		42B6C7E015F2297100C80CC4 /* CCThreadViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCThreadViewController.h; sourceTree = "<group>"; };
 		42B6C7E115F2297100C80CC4 /* CCThreadViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCThreadViewController.m; sourceTree = "<group>"; };
@@ -65,8 +68,10 @@
 		4221382C15F24FF00088B119 /* Custom */ = {
 			isa = PBXGroup;
 			children = (
-				4221382D15F24FF00088B119 /* CCURLRequest.h */,
-				4221382E15F24FF00088B119 /* CCURLRequest.m */,
+				4275125F15F3495C0025B046 /* UIView+Custom.h */,
+				4275126015F3495C0025B046 /* UIView+Custom.m */,
+				4275125C15F3493B0025B046 /* NSURLRequest+Custom.h */,
+				4275125D15F3493B0025B046 /* NSURLRequest+Custom.m */,
 			);
 			path = Custom;
 			sourceTree = "<group>";
@@ -215,7 +220,8 @@
 				42B6C7E215F2297100C80CC4 /* CCThreadViewController.m in Sources */,
 				42B6C7E515F22A3400C80CC4 /* CCThread.m in Sources */,
 				4221382715F24D990088B119 /* CCThreadCell.m in Sources */,
-				4221382F15F24FF00088B119 /* CCURLRequest.m in Sources */,
+				4275125E15F3493B0025B046 /* NSURLRequest+Custom.m in Sources */,
+				4275126115F3495C0025B046 /* UIView+Custom.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/skooma/CCAppDelegate.h b/skooma/CCAppDelegate.h
index b2203f4..2959640 100644
--- a/skooma/CCAppDelegate.h
+++ b/skooma/CCAppDelegate.h
@@ -8,7 +8,11 @@

 #import <UIKit/UIKit.h>

-#import "CCURLRequest.h"
+// カテゴリ
+#import "UIView+Custom.h"
+#import "NSURLRequest+Custom.h"
+
+
 #import "CCThreadViewController.h"

diff --git a/skooma/CCAppDelegate.m b/skooma/CCAppDelegate.m
index 3733c10..cb531c4 100644
--- a/skooma/CCAppDelegate.m
+++ b/skooma/CCAppDelegate.m
@@ -116,7 +116,8 @@ CCIcon          *icon = nil;
 //    UIViewController *rootViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil];
 //    [self.window addSubview:rootViewController.view];
 //    CCThreadViewController *threadViewController = [[CCThreadViewController alloc] initWithNibName:nil bundle:nil];
-    CCThreadViewController *threadViewController = [[CCThreadViewController alloc] initWithStyle:UITableViewStylePlain];
+    static CCThreadViewController *threadViewController;
+    threadViewController = [[CCThreadViewController alloc] initWithStyle:UITableViewStylePlain];
     [self.window addSubview:threadViewController.view];
     [self.window makeKeyAndVisible];

diff --git a/skooma/CCThreadCell.m b/skooma/CCThreadCell.m
index 77eed42..a0ac5a7 100644
--- a/skooma/CCThreadCell.m
+++ b/skooma/CCThreadCell.m
@@ -27,31 +27,35 @@
     // Configure the view for the selected state
 }

-//- (void)drawRect:(CGRect)rect
-//{
+- (void)drawRect:(CGRect)rect
+{
 //    UIFont *font = [UIFont fontWithName:@"azuki_font" size:15];
-//
+//    UIFont *font = [UIFont systemFontOfSize:15];
+    UIFont *font = [UIFont fontWithName:@"HiraKakuProN-W3"size:15];
+
 //    [color.black set];
-////    [[UIColor blackColor] set];
 //    [[NSString stringWithFormat:@"%d レス", _thread.resCount] drawInRect:CGRectMake(0, 0, 320, 60) withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentLeft];
-//
-////    [color.title set];
-////    [_thread.title drawInRect:_thread.titleRect withFont:boldFont];
-//
-////	s = thread.name;
-////	if (![s isEqualToString:@""]) {
-////		[nameColor set];
-////		[s drawInRect:thread.nameRect withFont:boldFont];
-////	}
-////
-////	s = thread.mail;
-////	if (![s isEqualToString:@""]) {
-////		[mailColor set];
-////		[s drawInRect:thread.mailRect withFont:boldFont];
-////	}
-////
-////    [color.resCount set];
-////    [[NSString stringWithFormat:@"%d レス", _thread.resCount] drawInRect:_thread.resCountRect withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentRight];
-//}
+    [color.black set];
+    [_thread.text drawInRect:CGRectMake(0, 0, 320, 60) withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentLeft];
+
+//    [color.title set];
+//    [_thread.title drawInRect:_thread.titleRect withFont:boldFont];
+
+//	s = thread.name;
+//	if (![s isEqualToString:@""]) {
+//		[nameColor set];
+//		[s drawInRect:thread.nameRect withFont:boldFont];
+//	}
+//
+//	s = thread.mail;
+//	if (![s isEqualToString:@""]) {
+//		[mailColor set];
+//		[s drawInRect:thread.mailRect withFont:boldFont];
+//	}
+//
+//    [color.resCount set];
+//    [[NSString stringWithFormat:@"%d レス", _thread.resCount] drawInRect:_thread.resCountRect withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentRight];
+}

 @end
+
diff --git a/skooma/CCThreadViewController.m b/skooma/CCThreadViewController.m
index 8a2b432..c50bc57 100644
--- a/skooma/CCThreadViewController.m
+++ b/skooma/CCThreadViewController.m
@@ -41,12 +41,10 @@

     _threads = [NSMutableArray new];

-    [self.tableView reloadData];
-
-////    CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=100x100x256"];
-//    CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=5x5x256"];
-//    _connection = [NSURLConnection connectionWithRequest:request delegate:self];
-//    _buffer = [NSMutableData new];
+//    CCURLRequest *request = [CCURLRequest requestWithURL:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=100x100x256"];
+    NSURLRequest *request = [NSURLRequest requestWithString:@"http://img.2chan.net/b/futaba.php?mode=cat&cxyl=5x5x256"];
+    _connection = [NSURLConnection connectionWithRequest:request delegate:self];
+    _buffer = [NSMutableData new];
 }

 - (void)viewDidUnload
@@ -75,26 +73,15 @@
 {
     NSLog(@"count ------------> %d", [_threads count]);
 //    return [_threads count];
-    return 3;
+    return [_threads count];
 }

-//- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
-//{
-////    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
-//    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
-//    cell.thread = [_threads objectAtIndex:indexPath.row];
-////    CCThreadCell *cell = [[CCThreadCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil];
-////    cell.thread = [_threads objectAtIndex:indexPath.row];
-//
-//    // Configure the cell...
-//
-//    return cell;
-//}
-
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    static NSString *CellIdentifier = @"Cell";
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    CCThreadCell *cell = [[CCThreadCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
+    cell.thread = [_threads objectAtIndex:indexPath.row];
+//    CCThreadCell *cell = [[CCThreadCell alloc] initWithFrame:CGRectZero reuseIdentifier:nil];
+//    cell.thread = [_threads objectAtIndex:indexPath.row];

     return cell;
 }
@@ -103,7 +90,6 @@

-
 #pragma mark - Table view delegate

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
@@ -171,9 +157,9 @@
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:4]]);
         CCThread *thread = [CCThread new];
         thread.number    = [[string substringWithRange:[match rangeAtIndex:1]] intValue];
-//        thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
-//        thread.text      = [string substringWithRange:[match rangeAtIndex:3]];
-//        thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
+        thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
+        thread.text      = [string substringWithRange:[match rangeAtIndex:3]];
+        thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
         [_threads addObject:thread];
     }];

diff --git a/skooma/Custom/CCURLRequest.h b/skooma/Custom/CCURLRequest.h
deleted file mode 100644
index 573ea6c..0000000
--- a/skooma/Custom/CCURLRequest.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-//  CCURLRequest.h
-//  skooma
-//
-//  Created by cc on 2012/09/01.
-//
-//
-
-#import <Foundation/Foundation.h>
-
-@interface CCURLRequest : NSURLRequest
-
-+ (id)requestWithURL:(NSString *)string;
-
-@end
diff --git a/skooma/Custom/CCURLRequest.m b/skooma/Custom/CCURLRequest.m
deleted file mode 100644
index ed8be54..0000000
--- a/skooma/Custom/CCURLRequest.m
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-//  CCURLRequest.m
-//  skooma
-//
-//  Created by cc on 2012/09/01.
-//
-//
-
-#import "CCURLRequest.h"
-
-@implementation CCURLRequest
-
-+ (id)requestWithURL:(NSString *)string
-{
-    return [CCURLRequest requestWithURL:[NSURL URLWithString:string] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30];
-}
-
-@end
\ No newline at end of file
diff --git a/skooma/Custom/NSURLRequest+Custom.h b/skooma/Custom/NSURLRequest+Custom.h
new file mode 100644
index 0000000..f25f26c
--- /dev/null
+++ b/skooma/Custom/NSURLRequest+Custom.h
@@ -0,0 +1,15 @@
+//
+//  NSURLRequest+Custom.h
+//  skooma
+//
+//  Created by cc on 2012/09/02.
+//
+//
+
+#import <Foundation/Foundation.h>
+
+@interface NSURLRequest (Custom)
+
++ (id)requestWithString:(NSString *)string;
+
+@end
diff --git a/skooma/Custom/NSURLRequest+Custom.m b/skooma/Custom/NSURLRequest+Custom.m
new file mode 100644
index 0000000..e2a7586
--- /dev/null
+++ b/skooma/Custom/NSURLRequest+Custom.m
@@ -0,0 +1,18 @@
+//
+//  NSURLRequest+Custom.m
+//  skooma
+//
+//  Created by cc on 2012/09/02.
+//
+//
+
+#import "NSURLRequest+Custom.h"
+
+@implementation NSURLRequest (Custom)
+
++ (id)requestWithString:(NSString *)string
+{
+    return [NSURLRequest requestWithURL:[NSURL URLWithString:string] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30];
+}
+
+@end
diff --git a/skooma/Custom/UIView+Custom.h b/skooma/Custom/UIView+Custom.h
new file mode 100644
index 0000000..7a095bf
--- /dev/null
+++ b/skooma/Custom/UIView+Custom.h
@@ -0,0 +1,15 @@
+//
+//  UIView+Custom.h
+//  skooma
+//
+//  Created by cc on 2012/09/02.
+//
+//
+
+#import <UIKit/UIKit.h>
+
+@interface UIView (Custom)
+
+- (void)removeAllSubviews;
+
+@end
diff --git a/skooma/Custom/UIView+Custom.m b/skooma/Custom/UIView+Custom.m
new file mode 100644
index 0000000..071f11d
--- /dev/null
+++ b/skooma/Custom/UIView+Custom.m
@@ -0,0 +1,20 @@
+//
+//  UIView+Custom.m
+//  skooma
+//
+//  Created by cc on 2012/09/02.
+//
+//
+
+#import "UIView+Custom.h"
+
+@implementation UIView (Custom)
+
+- (void)removeAllSubviews
+{
+    for (UIView *view in self.subviews) {
+        [view removeFromSuperview];
+    }
+}
+
+@end
[from now] 2012/09/02 21:21:31

diff --git a/skooma/CCThread.h b/skooma/CCThread.h
index 65f9024..76782d7 100644
--- a/skooma/CCThread.h
+++ b/skooma/CCThread.h
@@ -16,14 +16,14 @@
     @property (nonatomic) int resCount;
     @property (nonatomic) int is404;
     @property (nonatomic) NSString* thumbnail;
-    @property (nonatomic) NSString* source;
+    @property (nonatomic) NSString* src;
     @property (nonatomic) NSString* title;
     @property (nonatomic) NSString* name;
     @property (nonatomic) NSString* mail;
-    @property (nonatomic) NSString* text;
-    @property (nonatomic) NSMutableArray* lines;
+    @property (nonatomic) NSMutableString* text;
+    @property (nonatomic) NSArray* lines;

-    @property (nonatomic) float cellHeight;
+    @property (nonatomic) float  height;
     @property (nonatomic) CGRect titleRect;
     @property (nonatomic) CGRect nameRect;
     @property (nonatomic) CGRect mailRect;
@@ -32,4 +32,9 @@
     @property (nonatomic) CGRect boardRect;
     @property (nonatomic) CGRect is404Rect;

++ (id)threadWithDictionary:(NSDictionary *)dictionary;
+- (NSDictionary *)dictionary;
+
+- (void)coordinate;
+
 @end
diff --git a/skooma/CCThread.m b/skooma/CCThread.m
index 5b2ca4c..7a422d6 100644
--- a/skooma/CCThread.m
+++ b/skooma/CCThread.m
@@ -10,5 +10,130 @@

 @implementation CCThread

+- (id)initWithDictionary:(NSDictionary *)dictionary
+{
+    self = [super init];
+    if (self) {
+        _lines         = [NSMutableArray array];
+        _boardId       = [[dictionary objectForKey:@"board_id"] intValue];
+        _number        = [[dictionary objectForKey:@"number"] intValue];
+        _lastResNumber = [[dictionary objectForKey:@"last_res_number"] intValue];
+        _resCount      = [[dictionary objectForKey:@"res_count"] intValue];
+        _is404         = [[dictionary objectForKey:@"is_404"] intValue];
+        _thumbnail     = [dictionary objectForKey:@"thumbnail"];
+        _src           = [dictionary objectForKey:@"src"];
+        _title         = [dictionary objectForKey:@"title"];
+        _name          = [dictionary objectForKey:@"name"];
+        _mail          = [dictionary objectForKey:@"mail"];
+        _text          = [NSMutableString stringWithString:[dictionary objectForKey:@"text"]];
+
+        [self coordinate];
+    }
+    return self;
+}
+
++ (id)threadWithDictionary:(NSDictionary*)dictionary
+{
+	return [[CCThread alloc] initWithDictionary:dictionary];
+}
+
+- (NSDictionary *)dictionary
+{
+	NSMutableDictionary *dictionary = [NSMutableDictionary new];
+	[dictionary setObject:[NSNumber numberWithInt:_boardId] forKey:@"board_id"];
+	[dictionary setObject:[NSNumber numberWithInt:_number] forKey:@"number"];
+	[dictionary setObject:[NSNumber numberWithInt:_lastResNumber] forKey:@"last_res_number"];
+	[dictionary setObject:[NSNumber numberWithInt:_resCount] forKey:@"res_count"];
+	[dictionary setObject:[NSNumber numberWithInt:_is404] forKey:@"is_404"];
+	[dictionary setObject:_thumbnail forKey:@"thumbnail"];
+	[dictionary setObject:_src forKey:@"src"];
+	[dictionary setObject:_title forKey:@"title"];
+	[dictionary setObject:_name forKey:@"name"];
+	[dictionary setObject:_mail forKey:@"mail"];
+	[dictionary setObject:_text forKey:@"text"];
+	return dictionary;
+}
+
+#define MARGIN_W 3
+#define MARGIN_H 3
+#define IMAGE_W 80
+#define IMAGE_H 80
+#define BOUND_W 320
+#define BOUND_H IMAGE_W + MARGIN_H + MARGIN_H
+#define BODY_X MARGIN_W + IMAGE_W + MARGIN_W
+
+#define FONT_TITLE [UIFont boldSystemFontOfSize:12]
+
+- (void)coordinate
+{
+	[_text replaceOccurrencesOfString:@"<font color=\"#789922\">" withString:@""   options:0 range:NSMakeRange(0, [_text length])];
+	[_text replaceOccurrencesOfString:@"</font>"                  withString:@""   options:0 range:NSMakeRange(0, [_text length])];
+	[_text replaceOccurrencesOfString:@"&gt;"                     withString:@">"  options:0 range:NSMakeRange(0, [_text length])];
+	[_text replaceOccurrencesOfString:@"<br>"                     withString:@"\n" options:0 range:NSMakeRange(0, [_text length])];
+	while ([_text replaceOccurrencesOfString:@"\n\n" withString:@"\n" options:0 range:NSMakeRange(0, [_text length])]) {
+    };
+
+    _lines = [_text componentsSeparatedByString:@"\n"];
+
+    int x = 0;
+    int y = MARGIN_H;
+	CGSize s;
+//	Board *board = [appDelegate getBoardByBoardId:boardId];
+
+    if ([_title isEqualToString:@""] &&
+        [_name  isEqualToString:@""] &&
+        [_mail  isEqualToString:@""]) {
+
+        _titleRect = CGRectZero;
+        _nameRect  = CGRectZero;
+        _mailRect  = CGRectZero;
+    } else {
+
+    }
+
+    x = BODY_X;
+
+    s = [_title sizeWithFont:FONT_TITLE forWidth:BOUND_W lineBreakMode:UILineBreakModeTailTruncation];
+    _titleRect = CGRectMake(x, y, s.width, s.height);
+
+    x += s.width + MARGIN_W;
+
+    s = [_name sizeWithFont:FONT_TITLE forWidth:BOUND_W lineBreakMode:UILineBreakModeTailTruncation];
+    _nameRect = CGRectMake(x, y, s.width, s.height);
+
+    x += s.width + MARGIN_W;
+
+    s = [_mail sizeWithFont:FONT_TITLE forWidth:BOUND_W lineBreakMode:UILineBreakModeTailTruncation];
+    _mailRect = CGRectMake(x, y, s.width, s.height);
+
+    x = BODY_X;
+    y = s.height;
+
+    _textRect = CGRectMake(x, y, BOUND_W - x, BOUND_H - y);
+
+
+//	s = [NSString stringWithFormat:@"%d res", resCount];
+//	size = [s sizeWithFont:[UIFont boldSystemFontOfSize:THREAD_TITLE_FONT_SIZE] forWidth:THREAD_CONTENT_WIDTH lineBreakMode:UILineBreakModeClip];
+//	resCountRect = CGRectMake(THREAD_WIDTH - THREAD_RIGHT_MARGIN - THREAD_RES_WIDTH, y, THREAD_RES_WIDTH, size.height);
+//
+//	s = [NSString stringWithFormat:@"%@", board.formal];
+//	size = [s sizeWithFont:[UIFont boldSystemFontOfSize:THREAD_TITLE_FONT_SIZE] forWidth:THREAD_CONTENT_WIDTH lineBreakMode:UILineBreakModeTailTruncation];
+//	boardRect = CGRectMake(THREAD_WIDTH - THREAD_RIGHT_MARGIN - size.width, THREAD_MIN_HEIGHT - THREAD_V_MARGIN - size.height, size.width, size.height);
+//
+//	s = [NSString stringWithFormat:@"404", board.formal];
+//	size = [s sizeWithFont:[UIFont boldSystemFontOfSize:THREAD_TITLE_FONT_SIZE] forWidth:THREAD_CONTENT_WIDTH lineBreakMode:UILineBreakModeTailTruncation];
+//	is404Rect = CGRectMake(THREAD_LEFT, THREAD_MIN_HEIGHT - THREAD_V_MARGIN - size.height, size.width, size.height);
+//
+//	y += size.height;
+//	y += THREAD_TITLE_BOTTOM_MARGIN;
+//	textRect = CGRectMake(THREAD_LEFT, y, THREAD_CONTENT_WIDTH, THREAD_MIN_HEIGHT - y - THREAD_V_MARGIN);
+}
+
+- (CGFloat)height
+{
+    return BOUND_H;
+}
+
+

 @end
diff --git a/skooma/CCThreadCell.m b/skooma/CCThreadCell.m
index a0ac5a7..ee7b00e 100644
--- a/skooma/CCThreadCell.m
+++ b/skooma/CCThreadCell.m
@@ -22,14 +22,166 @@

 - (void)setSelected:(BOOL)selected animated:(BOOL)animated
 {
-    [super setSelected:selected animated:animated];
-
+//    [super setSelected:selected animated:animated];
+    [super setSelected:NO animated:NO];
+
     // Configure the view for the selected state
 }

+- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
+{
+    [super setHighlighted:highlighted animated:YES];
+}
+
 - (void)drawRect:(CGRect)rect
 {
-//    UIFont *font = [UIFont fontWithName:@"azuki_font" size:15];
+//	float x = thread.textRect.origin.x;
+//	float y = thread.textRect.origin.y;
+//	CGSize bounds = CGSizeMake(thread.textRect.size.width, thread.textRect.size.height);
+//
+//	for (NSString* line in thread.lines) {
+//		size = [line sizeWithFont:normalFont constrainedToSize:CGSizeMake(bounds.width, THREAD_MIN_HEIGHT - THREAD_V_MARGIN - y) lineBreakMode:UILineBreakModeClip];
+//
+//		// はみ出したらループ終了
+//		if (y + size.height > THREAD_MIN_HEIGHT - THREAD_V_MARGIN) {
+//			break;
+//		}
+//
+//		// 引用なら色を変える
+//		if ([line hasPrefix:@">"]) {
+//			[quoteColor set];
+//		} else {
+//			[textColor set];
+//		}
+//		[line drawInRect:CGRectMake(x, y, size.width, size.height) withFont:normalFont lineBreakMode:UILineBreakModeClip];
+//
+//		// 次の描画開始位置
+//		y += size.height;
+//	}
+//
+//	// どの板か表示
+//	if ([delegate mode] == MODE_HISTORY || [delegate mode] == MODE_RESULT) {
+//
+//		Board *board = [appDelegate getBoardByBoardId:thread.boardId];
+//
+//		[[self selectColor:board.boardId] set];
+//		[self drawRRoundRect:thread.boardRect withRadius:2.0f inContext:c];
+//		[[UIColor whiteColor] set];
+//		s = [NSString stringWithFormat:@"%@", board.formal];
+//		[s drawInRect:thread.boardRect withFont:boldFont];
+//	}
+//
+//	// 落ちてたら404表示
+//	if (thread.is404) {
+//		[[UIColor blackColor] set];
+//		[self drawRRoundRect:thread.is404Rect withRadius:2.0f inContext:c];
+//		[[UIColor whiteColor] set];
+//		s = @"404";
+//		[s drawInRect:thread.is404Rect withFont:boldFont];
+//	}
+//
+//	// ヒストリの場合デリートボタンを追加、それ以外の場合Three20ボタンを追加
+//	CGRect r = CGRectMake(THREAD_LEFT_MARGIN, THREAD_V_MARGIN, THREAD_ICON_WIDTH, THREAD_ICON_WIDTH);
+//	if ([delegate mode] == MODE_HISTORY) {
+//		[self makeDeleteButton:r action:@selector(deleteThread:)];
+//	} else {
+//		[self makeLinkButton:thread.text point:r.origin size:r.size action:@selector(openImage:)];
+//	}
+//
+//	// 画像を描画
+//	if (!thread.image) {
+//		thread.image = [imageStore getImage:[NSString stringWithFormat:@"http://eggnog.sakura.ne.jp/futaba/images/mini/%@_%@/%@", boardSelected.first, boardSelected.second, thread.thumb] key:thread.number];
+//	}
+//	if (thread.image) {
+//		CGRect iconRect = CGRectMake(THREAD_LEFT_MARGIN, THREAD_V_MARGIN, thread.image.size.width, thread.image.size.height);
+//		float ovalWidth = 10.0;
+//		float ovalHeight = 10.0;
+//		float w, h;
+//
+//		CGContextSaveGState(c);
+//		CGColorRef color = [[UIColor blackColor] CGColor];
+//		CGContextSetShadowWithColor(c, CGSizeMake(0, 0), 2, color);
+//		CGContextBeginPath(c);
+//		CGContextTranslateCTM(c, CGRectGetMinX(iconRect), CGRectGetMinY(iconRect));
+//		CGContextScaleCTM(c, ovalWidth, ovalHeight);
+//		w = CGRectGetWidth(iconRect) / ovalWidth;
+//		h = CGRectGetHeight(iconRect) / ovalHeight;
+//		CGContextMoveToPoint(c, w, h/2);
+//		CGContextAddArcToPoint(c, w, h, w/2, h, 0.5);
+//		CGContextAddArcToPoint(c, 0, h, 0, h/2, 0.5);
+//		CGContextAddArcToPoint(c, 0, 0, w/2, 0, 0.5);
+//		CGContextAddArcToPoint(c, w, 0, w, h/2, 0.5);
+//		CGContextClosePath(c);
+//		CGContextFillPath(c);
+//		CGContextRestoreGState(c);
+//
+//		CGContextSaveGState(c);
+//		CGContextBeginPath(c);
+//		CGContextTranslateCTM(c, CGRectGetMinX(iconRect), CGRectGetMinY(iconRect));
+//		CGContextScaleCTM(c, ovalWidth, ovalHeight);
+//		w = CGRectGetWidth(iconRect) / ovalWidth;
+//		h = CGRectGetHeight(iconRect) / ovalHeight;
+//		CGContextMoveToPoint(c, w, h/2);
+//		CGContextAddArcToPoint(c, w, h, w/2, h, 0.5);
+//		CGContextAddArcToPoint(c, 0, h, 0, h/2, 0.5);
+//		CGContextAddArcToPoint(c, 0, 0, w/2, 0, 0.5);
+//		CGContextAddArcToPoint(c, w, 0, w, h/2, 0.5);
+//		CGContextClosePath(c);
+//		CGContextRestoreGState(c);
+//		CGContextClip(c);
+//		[thread.image drawInRect:iconRect];
+//	}
+
+////////////////////////////////////////////////////////////////////////////////
+//	if (cell.selected || cell.highlighted) {
+//	} else {
+//	}
+
+//	CGContextRef c = UIGraphicsGetCurrentContext();
+
+//    // 背景グラデーション描画
+//    CGGradientRef gradient;
+//    CGColorSpaceRef colorSpace;
+//    size_t num_locations = 2;
+//    CGFloat locations[2] = {0.0, 1.0};
+//    colorSpace = CGColorSpaceCreateDeviceRGB();
+//    if ([self isInHistory]) {
+//        CGFloat components[8] = {0.78, 0.73, 0.73, 1.0, 0.76, 0.64, 0.63, 1.0};
+//        gradient = CGGradientCreateWithColorComponents(colorSpace, components, locations, num_locations);
+//    } else {
+//        CGFloat components[8] = {1.0, 1.0, 0.93, 1.0, 0.98, 0.91, 0.83, 1.0};
+//        gradient = CGGradientCreateWithColorComponents(colorSpace, components, locations, num_locations);
+//    }
+//    CGPoint startPoint = CGPointMake(self.frame.size.width/2, 0);
+//    CGPoint endPoint = CGPointMake(self.frame.size.width/2, self.frame.size.height);
+//    CGContextDrawLinearGradient(c, gradient, startPoint, endPoint, 0);
+//    CGGradientRelease(gradient);
+//    CGColorSpaceRelease(colorSpace);
+//    CGContextDrawPath(c, kCGPathFillStroke);
+//    // ビュー上部の線
+//    if ([self isInHistory]) {
+//        [[UIColor colorWithRed:0.88 green:0.83 blue:0.83 alpha:1.0] setStroke];
+//    } else {
+//        [[UIColor whiteColor] setStroke];
+//    }
+//    CGContextBeginPath(c);
+//    CGContextMoveToPoint(c, 0, 0);
+//    CGContextAddLineToPoint(c, self.bounds.size.width, 0);
+//    CGContextStrokePath(c);
+//
+//    // ビュー下部の線
+//    if ([self isInHistory]) {
+//        [[UIColor colorWithRed:0.71 green:0.59 blue:0.58 alpha:1.0] setStroke];
+//    } else {
+//        [[UIColor colorWithRed:0.93 green:0.86 blue:0.78 alpha:1.0] setStroke];
+//    }
+//    CGContextBeginPath(c);
+//    CGContextMoveToPoint(c, 0, self.bounds.size.height);
+//    CGContextAddLineToPoint(c, self.bounds.size.width, self.bounds.size.height);
+//    CGContextStrokePath(c);
+
+
+    //    UIFont *font = [UIFont fontWithName:@"azuki_font" size:15];
 //    UIFont *font = [UIFont systemFontOfSize:15];
     UIFont *font = [UIFont fontWithName:@"HiraKakuProN-W3"size:15];

@@ -52,9 +204,6 @@
 //		[mailColor set];
 //		[s drawInRect:thread.mailRect withFont:boldFont];
 //	}
-//
-//    [color.resCount set];
-//    [[NSString stringWithFormat:@"%d レス", _thread.resCount] drawInRect:_thread.resCountRect withFont:font lineBreakMode:UILineBreakModeClip alignment:UITextAlignmentRight];
 }

 @end
diff --git a/skooma/CCThreadViewController.m b/skooma/CCThreadViewController.m
index c50bc57..92d1f08 100644
--- a/skooma/CCThreadViewController.m
+++ b/skooma/CCThreadViewController.m
@@ -94,12 +94,11 @@

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
-
 }

 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    return 60;
+    return 86;
 }

@@ -155,11 +154,18 @@
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:2]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:3]]);
 //        NSLog(@"%@", [string substringWithRange:[match rangeAtIndex:4]]);
-        CCThread *thread = [CCThread new];
-        thread.number    = [[string substringWithRange:[match rangeAtIndex:1]] intValue];
-        thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
-        thread.text      = [string substringWithRange:[match rangeAtIndex:3]];
-        thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
+//        CCThread *thread = [CCThread new];
+//        thread.number    = [[string substringWithRange:[match rangeAtIndex:1]] intValue];
+//        thread.thumbnail = [string substringWithRange:[match rangeAtIndex:2]];
+//        thread.text      = [NSMutableString stringWithString:[string substringWithRange:[match rangeAtIndex:3]]];
+//        thread.resCount  = [[string substringWithRange:[match rangeAtIndex:4]] intValue];
+//        [_threads addObject:thread];
+        NSMutableDictionary *dictionary = [NSMutableDictionary new];
+        [dictionary setObject:[string substringWithRange:[match rangeAtIndex:1]] forKey:@"number"];
+        [dictionary setObject:[string substringWithRange:[match rangeAtIndex:2]] forKey:@"thumbnail"];
+        [dictionary setObject:[string substringWithRange:[match rangeAtIndex:3]] forKey:@"text"];
+        [dictionary setObject:[string substringWithRange:[match rangeAtIndex:4]] forKey:@"resCount"];
+        CCThread *thread = [CCThread threadWithDictionary:dictionary];
         [_threads addObject:thread];
     }];