Skip to content
This repository has been archived by the owner on Nov 12, 2017. It is now read-only.

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
cutmail committed Sep 27, 2012
1 parent dc90720 commit d59fd45
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 58 deletions.
81 changes: 61 additions & 20 deletions Buzzurl touch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
18145E471614A5B400596AD7 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 18145E461614A5B400596AD7 /* [email protected] */; };
18145E4B1614B40E00596AD7 /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18145E4A1614B40E00596AD7 /* Crashlytics.framework */; };
18391BE8150B231A008207C0 /* UIColor+NSString.m in Sources */ = {isa = PBXBuildFile; fileRef = 18391BE7150B231A008207C0 /* UIColor+NSString.m */; };
185082641375884E0020EED0 /* blueArrow.png in Resources */ = {isa = PBXBuildFile; fileRef = 185082551375884E0020EED0 /* blueArrow.png */; };
185082651375884E0020EED0 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 185082561375884E0020EED0 /* [email protected] */; };
Expand Down Expand Up @@ -48,7 +50,6 @@
187AE7BC141DFD6F0065D960 /* RecentArticleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 187AE7BA141DFD6F0065D960 /* RecentArticleViewController.xib */; };
1899888C141E1822006FB745 /* WebViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1899888B141E1822006FB745 /* WebViewController.xib */; };
18AE580D141D1B0100C71E23 /* Buzzurl.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE580C141D1B0100C71E23 /* Buzzurl.m */; };
18C0BDBE141E3F7D004448BF /* libAdMaker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18C0BDBD141E3F7D004448BF /* libAdMaker.a */; };
18C0BDC2141E4337004448BF /* TDBadgedCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C0BDC1141E4337004448BF /* TDBadgedCell.m */; };
18C9304B13757F5A006F5DD3 /* RootViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 18C9304C13757F5A006F5DD3 /* RootViewController.xib */; };
18C9304E13757F63006F5DD3 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 18C9304F13757F63006F5DD3 /* MainWindow.xib */; };
Expand All @@ -59,6 +60,8 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
18145E461614A5B400596AD7 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "[email protected]"; path = "images/[email protected]"; sourceTree = "<group>"; };
18145E4A1614B40E00596AD7 /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = "<group>"; };
18391BE6150B2319008207C0 /* UIColor+NSString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+NSString.h"; sourceTree = "<group>"; };
18391BE7150B231A008207C0 /* UIColor+NSString.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+NSString.m"; sourceTree = "<group>"; };
185082551375884E0020EED0 /* blueArrow.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = blueArrow.png; path = images/blueArrow.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -147,7 +150,7 @@
186781CD13743AF0001D60A2 /* UIKit.framework in Frameworks */,
186781CF13743AF0001D60A2 /* Foundation.framework in Frameworks */,
186781D113743AF0001D60A2 /* CoreGraphics.framework in Frameworks */,
18C0BDBE141E3F7D004448BF /* libAdMaker.a in Frameworks */,
18145E4B1614B40E00596AD7 /* Crashlytics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -184,6 +187,7 @@
186781CB13743AF0001D60A2 /* Frameworks */ = {
isa = PBXGroup;
children = (
18145E4A1614B40E00596AD7 /* Crashlytics.framework */,
18DB9E07158CCD7B004BD300 /* MessageUI.framework */,
1867821913743C08001D60A2 /* QuartzCore.framework */,
1867821713743C01001D60A2 /* Security.framework */,
Expand All @@ -205,9 +209,9 @@
186781FE13743BC2001D60A2 /* json-framework */,
187AE793141DEF560065D960 /* models */,
186781DB13743AF0001D60A2 /* Buzzurl_touchAppDelegate.h */,
186781DC13743AF0001D60A2 /* Buzzurl_touchAppDelegate.m */,
18391BE6150B2319008207C0 /* UIColor+NSString.h */,
18391BE7150B231A008207C0 /* UIColor+NSString.m */,
186781DC13743AF0001D60A2 /* Buzzurl_touchAppDelegate.m */,
18C9304F13757F63006F5DD3 /* MainWindow.xib */,
18AE580B141D1B0100C71E23 /* Buzzurl.h */,
18AE580C141D1B0100C71E23 /* Buzzurl.m */,
Expand Down Expand Up @@ -245,6 +249,7 @@
186781F213743B3B001D60A2 /* images */ = {
isa = PBXGroup;
children = (
18145E461614A5B400596AD7 /* [email protected] */,
185082551375884E0020EED0 /* blueArrow.png */,
185082561375884E0020EED0 /* [email protected] */,
185082571375884E0020EED0 /* Default.png */,
Expand Down Expand Up @@ -341,6 +346,7 @@
186781C413743AF0001D60A2 /* Sources */,
186781C513743AF0001D60A2 /* Frameworks */,
186781C613743AF0001D60A2 /* Resources */,
18145E491614B3C400596AD7 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -406,11 +412,28 @@
18508278137595890020EED0 /* Entitlements.plist in Resources */,
187AE7BC141DFD6F0065D960 /* RecentArticleViewController.xib in Resources */,
1899888C141E1822006FB745 /* WebViewController.xib in Resources */,
18145E471614A5B400596AD7 /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
18145E491614B3C400596AD7 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "./Crashlytics.framework/run 7d0f3ef6938723ac69b416c2f9d0cfa7f9ae7437";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
186781C413743AF0001D60A2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -480,10 +503,10 @@
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = NO;
PROVISIONING_PROFILE = "10530B10-9DBB-4B90-8AED-D9917C5F696E";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "10530B10-9DBB-4B90-8AED-D9917C5F696E";
PROVISIONING_PROFILE = "6131281C-CF15-440D-8C2A-0435AD89B599";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "6131281C-CF15-440D-8C2A-0435AD89B599";
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -502,7 +525,7 @@
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PROVISIONING_PROFILE = "";
Expand All @@ -517,18 +540,22 @@
CODE_SIGN_IDENTITY = "iPhone Developer: Tatsuya Arai (A669DLNGP9)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Tatsuya Arai (A669DLNGP9)";
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Buzzurl touch/Buzzurl touch-Prefix.pch";
INFOPLIST_FILE = "Buzzurl touch/Buzzurl touch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Buzzurl touch\"",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "10530B10-9DBB-4B90-8AED-D9917C5F696E";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "10530B10-9DBB-4B90-8AED-D9917C5F696E";
PROVISIONING_PROFILE = "6131281C-CF15-440D-8C2A-0435AD89B599";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "6131281C-CF15-440D-8C2A-0435AD89B599";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
Expand All @@ -539,10 +566,14 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Buzzurl touch/Buzzurl touch-Prefix.pch";
INFOPLIST_FILE = "Buzzurl touch/Buzzurl touch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Buzzurl touch\"",
Expand All @@ -568,10 +599,10 @@
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PROVISIONING_PROFILE = "26CF97B2-D826-4051-9C42-CB1FE61B578D";
PROVISIONING_PROFILE = "FA7BA544-2252-4CE2-AF5F-8AAF381E6459";
SDKROOT = iphoneos;
};
name = AdHoc;
Expand All @@ -582,16 +613,20 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Distribution: Tatsuya Arai";
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Buzzurl touch/Buzzurl touch-Prefix.pch";
INFOPLIST_FILE = "Buzzurl touch/Buzzurl touch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Buzzurl touch\"",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "26CF97B2-D826-4051-9C42-CB1FE61B578D";
PROVISIONING_PROFILE = "FA7BA544-2252-4CE2-AF5F-8AAF381E6459";
TARGETED_DEVICE_FAMILY = 1;
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
Expand All @@ -613,11 +648,11 @@
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = NO;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
PROVISIONING_PROFILE = "00817690-FA68-4910-A19E-97263444D22C";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "00817690-FA68-4910-A19E-97263444D22C";
PROVISIONING_PROFILE = "85B39DA0-6E9D-453E-946B-9CEBEBA7E06E";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "85B39DA0-6E9D-453E-946B-9CEBEBA7E06E";
SDKROOT = iphoneos;
};
name = AppStore;
Expand All @@ -627,17 +662,23 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CODE_SIGN_IDENTITY = "iPhone Distribution: Tatsuya Arai";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Tatsuya Arai";
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Buzzurl touch/Buzzurl touch-Prefix.pch";
INFOPLIST_FILE = "Buzzurl touch/Buzzurl touch-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Buzzurl touch\"",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "00817690-FA68-4910-A19E-97263444D22C";
PROVISIONING_PROFILE = "85B39DA0-6E9D-453E-946B-9CEBEBA7E06E";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "85B39DA0-6E9D-453E-946B-9CEBEBA7E06E";
TARGETED_DEVICE_FAMILY = 1;
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
Expand Down
4 changes: 2 additions & 2 deletions Buzzurl touch/Buzzurl touch-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.1</string>
<string>1.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.1</string>
<string>1.2.2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
Expand Down
3 changes: 3 additions & 0 deletions Buzzurl touch/Buzzurl_touchAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "Buzzurl_touchAppDelegate.h"
#import <Crashlytics/Crashlytics.h>

@implementation Buzzurl_touchAppDelegate

Expand All @@ -18,6 +19,8 @@ @implementation Buzzurl_touchAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Crashlytics startWithAPIKey:@"7d0f3ef6938723ac69b416c2f9d0cfa7f9ae7437"];

// Override point for customization after application launch.
// Add the navigation controller's view to the window and display.
// self.window.rootViewController = self.navigationController;
Expand Down
18 changes: 2 additions & 16 deletions Buzzurl touch/RecentArticleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ - (NSData *)getData:(NSString *)url; {

- (void)loadNewData {

// if ([self isLogin] == YES) {
//
// } else {
// [self showSettings];
// [self doneLoadingTableViewData];
// return;
// }

main_queue = dispatch_get_main_queue();
timeline_queue = dispatch_queue_create("me.cutmail.buzzurl.timeline", NULL);

Expand Down Expand Up @@ -87,18 +79,12 @@ - (void)viewDidLoad

self.articleList = [[NSMutableArray alloc] init];

[self loadNewData];
[self loadNewData];
}

- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];

// if ([self isLogin] == YES) {
// [self loadNewData];
// } else {
// [self showSettings];
// }
[super viewWillAppear:animated];

[_refreshHeaderView refreshLastUpdatedDate];
}
Expand Down
22 changes: 2 additions & 20 deletions Buzzurl touch/RootViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ - (NSData *)getData:(NSString *)url; {
}

- (void)loadNewData {

// if ([self isLogin] == YES) {
//
// } else {
//// [self showSettings];
// [self doneLoadingTableViewData];
// return;
// }

main_queue = dispatch_get_main_queue();
timeline_queue = dispatch_queue_create("me.cutmail.buzzurl.timeline", NULL);
Expand Down Expand Up @@ -95,7 +87,7 @@ - (void)viewWillAppear:(BOOL)animated
[super viewWillAppear:animated];

if ([self isLogin] == YES) {
[self loadNewData];
[self loadNewData];
} else {
[self showSettings];
}
Expand Down Expand Up @@ -154,7 +146,6 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// return articleTitles ? [articleTitles count] : 0;
return articleList ? [articleList count] : 0;
}

Expand All @@ -163,26 +154,17 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
{
static NSString *CellIdentifier = @"ArticleCell";

// if (!articleTitles) {
// UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
// cell.textLabel.text = @"読み込み中...";
// cell.textLabel.textColor = [UIColor grayColor];
// return cell;
// }

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

Article* article = [articleList objectAtIndex:[indexPath row]];

// cell.textLabel.text = [articleTitles objectAtIndex:[indexPath row]];
cell.textLabel.text = article.title;
cell.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14.0];
cell.textLabel.textColor = [UIColor darkGrayColor];

// cell.detailTextLabel.text = [articleComments objectAtIndex:[indexPath row]];
cell.detailTextLabel.text = article.comment;
cell.detailTextLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:12.0];
cell.detailTextLabel.textColor = [UIColor grayColor];
Expand Down Expand Up @@ -253,7 +235,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
- (void)reloadTableViewDataSource {
if ([self isLogin] == YES) {
_reloading = YES;
[self loadNewData];
[self loadNewData];
} else {
_reloading = NO;
}
Expand Down

0 comments on commit d59fd45

Please sign in to comment.