Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed iOS SDK 4.2

  • Loading branch information...
commit f4cbafde7f4eb134d147d6402ec695b81b33fdf3 1 parent eb9b70a
@kishikawakatsumi authored
Showing with 273 additions and 141 deletions.
  1. +1 −1  Classes/AddBookmarkViewController.h
  2. +31 −7 Classes/AddBookmarkViewController.m
  3. +5 −14 Classes/DiaryListViewController.m
  4. +3 −0  Classes/DiaryViewController.h
  5. +21 −5 Classes/DiaryViewController.m
  6. +1 −1  Classes/HatenaAtomPub.m
  7. +1 −1  Classes/HatenaRSSParser.m
  8. +1 −1  Classes/HatenaTouchAppDelegate.m
  9. +3 −12 Classes/HotEntryViewController.m
  10. +1 −1  Classes/ImagePreviewViewController.h
  11. +9 −9 Classes/InternetReachability.m
  12. +4 −13 Classes/MyBookmarkViewController.m
  13. +3 −12 Classes/RecentEntryViewController.m
  14. +5 −1 Classes/RootViewController.h
  15. +44 −2 Classes/RootViewController.m
  16. +18 −5 Classes/UIImage+ProportionalFill.m
  17. +2 −9 Classes/UserSettings.m
  18. +5 −1 Classes/WebViewController.h
  19. +62 −16 Classes/WebViewController.m
  20. BIN  English.lproj/Localizable.strings
  21. +1 −1  English.lproj/help.html
  22. +1 −1  HatenaTouch-Info.plist
  23. +50 −26 HatenaTouch.xcodeproj/project.pbxproj
  24. +0 −1  HatenaTouch_Prefix.pch
  25. BIN  Japanese.lproj/Localizable.strings
  26. +1 −1  Japanese.lproj/help.html
View
2  Classes/AddBookmarkViewController.h
@@ -10,7 +10,7 @@
@class MyBookmarkAPI;
-@interface AddBookmarkViewController : UIViewController {
+@interface AddBookmarkViewController : UIViewController<UITextFieldDelegate> {
UILabel *titleLabel;
UILabel *URLLabel;
UITextField *commentField;
View
38 Classes/AddBookmarkViewController.m
@@ -32,7 +32,7 @@ - (void)loadView {
self.view = contentView;
[contentView release];
- titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10.0f, 8.0f, 300.0f, 44.0f)];
+ titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10.0f, 4.0f, 300.0f, 44.0f)];
titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
titleLabel.backgroundColor = [UIColor clearColor];
titleLabel.font = [UIFont boldSystemFontOfSize:14.0f];
@@ -40,7 +40,7 @@ - (void)loadView {
[contentView addSubview:titleLabel];
[titleLabel release];
- URLLabel = [[UILabel alloc] initWithFrame:CGRectMake(10.0f, 52.0f, 300.0f, 40.0f)];
+ URLLabel = [[UILabel alloc] initWithFrame:CGRectMake(10.0f, 48.0f, 300.0f, 40.0f)];
URLLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
URLLabel.backgroundColor = [UIColor clearColor];
URLLabel.font = [UIFont systemFontOfSize:12.0f];
@@ -50,13 +50,22 @@ - (void)loadView {
[contentView addSubview:URLLabel];
[URLLabel release];
- commentField = [[UITextField alloc] initWithFrame:CGRectMake(10.0f, 102.0f, 300.0f, 31.0f)];
- commentField.borderStyle = UITextBorderStyleBezel;
+ commentField = [[UITextField alloc] initWithFrame:CGRectMake(10.0f, 86.0f, 300.0f, 29.0f)];
+ commentField.autoresizingMask = UIViewAutoresizingFlexibleWidth;
+ commentField.delegate = self;
+ commentField.borderStyle = UITextBorderStyleLine;
+ commentField.adjustsFontSizeToFitWidth = NO;
+ commentField.clearButtonMode = UITextFieldViewModeWhileEditing;
+ commentField.clearsOnBeginEditing = NO;
+ commentField.enablesReturnKeyAutomatically = YES;
+ commentField.returnKeyType = UIReturnKeyDone;
+ commentField.placeholder = NSLocalizedString(@"Comment", nil);
[contentView addSubview:commentField];
[commentField release];
- UIButton *addButton = [UIButton buttonWithType:111];
- addButton.frame = CGRectMake(200.0f, 153.0f, 114.0f, 40.0f);
+ UIButton *addButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
+ addButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin;
+ addButton.frame = CGRectMake(200.0f, 140.0f, 110.0f, 36.0f);
[addButton setTitle:NSLocalizedString(@"Add", nil) forState:UIControlStateNormal];
[addButton addTarget:self action:@selector(addBookmark:) forControlEvents:UIControlEventTouchUpInside];
[contentView addSubview:addButton];
@@ -81,7 +90,11 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ self.title = NSLocalizedString(@"Add MyBookmark", nil);
+
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
titleLabel.text = self.pageTitle;
URLLabel.text = self.pageURL;
@@ -89,6 +102,8 @@ - (void)viewDidLoad {
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:self action:@selector(dismiss:)];
[self.navigationItem setRightBarButtonItem:closeButton animated:NO];
[closeButton release];
+
+ [commentField becomeFirstResponder];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -110,6 +125,8 @@ - (void)viewDidUnload {
- (void)addBookmark:(id)sender {
[[NetworkActivityManager sharedInstance] pushActivity:NSStringFromClass([self class])];
+ [commentField resignFirstResponder];
+
[UIView beginAnimations:nil context:nil];
blockView.alpha = 1.0f;
[UIView commitAnimations];
@@ -170,4 +187,11 @@ - (void)applicationDidEnterBackground:(NSNotification *)note {
alert = nil;
}
+#pragma mark -
+
+- (BOOL)textFieldShouldReturn:(UITextField *)textField {
+ [textField resignFirstResponder];
+ return YES;
+}
+
@end
View
19 Classes/DiaryListViewController.m
@@ -108,7 +108,9 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
self.title = NSLocalizedString(@"BacknumberTitle", nil);
@@ -156,17 +158,6 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated {
#pragma mark -
- (void)loadNextData {
- if (![[InternetReachability sharedInstance] isReachableInternet]) {
- alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
- message:NSLocalizedString(@"No internet connection.", nil)
- delegate:self
- cancelButtonTitle:nil
- otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
- [alert show];
- [alert release];
- return;
- }
-
[[NetworkActivityManager sharedInstance] pushActivity:NSStringFromClass([self class])];
dotImageView.hidden = YES;
[activityIndicator startAnimating];
@@ -333,7 +324,7 @@ - (void)parser:(DiaryFeedParser *)parser encounteredError:(NSError *)error {
[alert release];
}
-- (void)parserFinished:(DiaryFeedParser *)parser {
+- (void)parserFinished:(DiaryFeedParser *)p {
if ([[parser.diaries objectForKey:@"entries"] count] < 20) {
hasMoreData = NO;
dotImageView.hidden = NO;
@@ -361,7 +352,7 @@ - (void)diaryUploader:(DiaryUploader *)uploader uploadFinished:(id)responseData
[[NetworkActivityManager sharedInstance] popActivity:NSStringFromClass([self class])];
}
-- (void)diaryUploader:(DiaryUploader *)uploader uploadFailed:(NSError *)error {
+- (void)diaryUploader:(DiaryUploader *)diaryUploader uploadFailed:(NSError *)error {
self.uploader = nil;
[UIView beginAnimations:nil context:nil];
View
3  Classes/DiaryViewController.h
@@ -42,6 +42,8 @@ UINavigationControllerDelegate, UIImagePickerControllerDelegate> {
NSInteger statusCode;
BOOL initialized;
+
+ NSString *insertText;
}
@property (nonatomic, retain) Diary *editingDiary;
@@ -50,5 +52,6 @@ UINavigationControllerDelegate, UIImagePickerControllerDelegate> {
@property (nonatomic, retain) NSString *diaryTextForEdit;
@property (nonatomic, retain) NSMutableData *receivedData;
@property (nonatomic, assign) BOOL isDraft;
+@property (nonatomic, retain) NSString *insertText;
@end
View
26 Classes/DiaryViewController.m
@@ -16,7 +16,6 @@
#import "FotolifeUploader.h"
#import "UserSettings.h"
#import "NetworkActivityManager.h"
-#import "NSData+Base64.h"
#import <QuartzCore/QuartzCore.h>
#import <objc/runtime.h>
@@ -37,12 +36,14 @@ - (void)enableUserInteraction;
- (void)disableUserInteraction;
- (void)saveTemporaryDiary;
- (void)loadTemporaryDiary;
+- (void)insertSyntax:(NSString *)syntax;
@end
@implementation DiaryViewController
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
+ [[NetworkActivityManager sharedInstance] popActivity:NSStringFromClass([self class])];
self.editingDiary = nil;
self.editURI = nil;
self.titleTextForEdit = nil;
@@ -154,7 +155,9 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
@@ -205,6 +208,11 @@ - (void)viewDidLoad {
[self loadTemporaryDiary];
titleField.text = self.editingDiary.titleText;
bodyTextView.text = self.editingDiary.diaryText;
+
+ if (self.insertText) {
+ [self insertSyntax:self.insertText];
+ self.insertText = nil;
+ }
}
clearButton.enabled = [titleField.text length] > 0 || [bodyTextView.text length] > 0;
@@ -230,6 +238,8 @@ - (void)viewDidUnload {
[super viewDidUnload];
[[NSNotificationCenter defaultCenter] removeObserver:self];
+ bodyTextView = nil;
+
blockView = nil;
indicatorView = nil;
messageLabel = nil;
@@ -376,6 +386,10 @@ - (void)uploadImage:(UIImage *)image title:(NSString *)title {
}
- (void)insertSyntax:(NSString *)syntax {
+ if (!bodyTextView) {
+ self.insertText = syntax;
+ return;
+ }
id newText = [NSMutableString stringWithString:bodyTextView.text];
if ([newText length] == 0) {
newText = syntax;
@@ -450,7 +464,7 @@ - (void)hatenaSyntaxViewController:(HatenaSyntaxViewController *)controller didS
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
- UIImage *originalImage = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
+ UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
if (pickerController.sourceType == UIImagePickerControllerSourceTypeCamera) {
[picker dismissModalViewControllerAnimated:YES];
@@ -466,7 +480,6 @@ - (void)imagePickerController:(UIImagePickerController *)picker didFinishPicking
[picker pushViewController:controller animated:YES];
[controller release];
}
-
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
@@ -678,7 +691,6 @@ - (void)diaryUploader:(DiaryUploader *)uploader uploadFinished:(id)responseData
}
- (void)diaryUploader:(DiaryUploader *)uploader uploadFailed:(NSError *)error {
- NSLog(@"%s", __func__);
[self enableUserInteraction];
[[NetworkActivityManager sharedInstance] popActivity:NSStringFromClass([self class])];
@@ -747,6 +759,10 @@ - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)
- (void)applicationDidEnterBackground:(NSNotification *)note {
[alert dismissWithClickedButtonIndex:0 animated:NO];
alert = nil;
+
+ if (self.modalViewController) {
+ [self.modalViewController dismissModalViewControllerAnimated:NO];
+ }
}
@end
View
2  Classes/HatenaAtomPub.m
@@ -51,7 +51,7 @@ - (NSMutableURLRequest *)makeRequestWithURI:(NSString *)URI method:(NSString *)m
NSString *password = settings.password;
NSURL *webServiceURL = [NSURL URLWithString:URI];
- NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:webServiceURL cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:20.0];
+ NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:webServiceURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0];
NSString *credentials = [self makeCredentialsWithUsername:username password:password];
View
2  Classes/HatenaRSSParser.m
@@ -41,7 +41,7 @@ - (id)init {
- (id)initWithURL:(NSURL *)URL {
if (self = [super init]) {
identifier = [[URL absoluteString] retain];
- self.request = [NSURLRequest requestWithURL:URL cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:20.0];
+ self.request = [NSURLRequest requestWithURL:URL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0];
[self commonInit];
}
View
2  Classes/HatenaTouchAppDelegate.m
@@ -18,7 +18,7 @@ @implementation HatenaTouchAppDelegate
#pragma mark -
#pragma mark Application lifecycle
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window makeKeyAndVisible];
[window addSubview:navigationController.view];
View
15 Classes/HotEntryViewController.m
@@ -121,7 +121,9 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
self.title = NSLocalizedString(@"HotEntry", nil);
@@ -160,17 +162,6 @@ - (void)viewDidUnload {
#pragma mark -
- (void)cateoryChanged:(id)sender {
- if (![[InternetReachability sharedInstance] isReachableInternet]) {
- alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
- message:NSLocalizedString(@"No internet connection.", nil)
- delegate:self
- cancelButtonTitle:nil
- otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
- [alert show];
- [alert release];
- return;
- }
-
UISegmentedControl *control = (UISegmentedControl *)sender;
NSInteger index = control.selectedSegmentIndex;
View
2  Classes/ImagePreviewViewController.h
@@ -20,4 +20,4 @@
@protocol ImagePreviewViewControllerDelegate
- (void)imagePreviewControllerDidFinishPickingMedia:(ImagePreviewViewController *)controller;
- (void)imagePreviewControllerDidCancel:(ImagePreviewViewController *)controller;
-@end
+@end
View
18 Classes/InternetReachability.m
@@ -37,15 +37,15 @@ - (void)dealloc {
- (void)reachabilityChanged:(NSNotification *)note {
Reachability *reachability = [note object];
NetworkStatus netStatus = [reachability currentReachabilityStatus];
-// if (netStatus == NotReachable) {
-// alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
-// message:NSLocalizedString(@"No internet connection.", nil)
-// delegate:self
-// cancelButtonTitle:nil
-// otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
-// [alert show];
-// [alert release];
-// }
+ if (netStatus == NotReachable) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
+ message:NSLocalizedString(@"No internet connection.", nil)
+ delegate:self
+ cancelButtonTitle:nil
+ otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
+ [alert show];
+ [alert release];
+ }
}
- (BOOL)isReachableInternet {
View
17 Classes/MyBookmarkViewController.m
@@ -94,7 +94,9 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
self.title = NSLocalizedString(@"MyBookmark", nil);
@@ -142,17 +144,6 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated {
#pragma mark -
- (void)loadNextData {
- if (![[InternetReachability sharedInstance] isReachableInternet]) {
- alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
- message:NSLocalizedString(@"No internet connection.", nil)
- delegate:self
- cancelButtonTitle:nil
- otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
- [alert show];
- [alert release];
- return;
- }
-
[[NetworkActivityManager sharedInstance] pushActivity:NSStringFromClass([self class])];
dotImageView.hidden = YES;
[activityIndicator startAnimating];
@@ -328,7 +319,7 @@ - (void)parser:(MyBookmarkFeedParser *)parser encounteredError:(NSError *)error
[alert release];
}
-- (void)parserFinished:(MyBookmarkFeedParser *)parser {
+- (void)parserFinished:(MyBookmarkFeedParser *)p {
if ([[parser.bookmarks objectForKey:@"entries"] count] < 20) {
hasMoreData = NO;
dotImageView.hidden = NO;
View
15 Classes/RecentEntryViewController.m
@@ -119,7 +119,9 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
self.title = NSLocalizedString(@"RecentEntry", nil);
@@ -158,17 +160,6 @@ - (void)viewDidUnload {
#pragma mark -
- (void)cateoryChanged:(id)sender {
- if (![[InternetReachability sharedInstance] isReachableInternet]) {
- alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
- message:NSLocalizedString(@"No internet connection.", nil)
- delegate:self
- cancelButtonTitle:nil
- otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
- [alert show];
- [alert release];
- return;
- }
-
UISegmentedControl *control = (UISegmentedControl *)sender;
NSInteger index = control.selectedSegmentIndex;
View
6 Classes/RootViewController.h
@@ -7,9 +7,13 @@
//
#import <UIKit/UIKit.h>
+#import <iAd/iAd.h>
-@interface RootViewController : UIViewController<UITableViewDelegate, UITableViewDataSource> {
+@interface RootViewController : UIViewController<UITableViewDelegate, UITableViewDataSource, ADBannerViewDelegate> {
UITableView *listView;
+ BOOL iAdIsAvailable;
}
+@property (nonatomic, retain) ADBannerView *bannerView;
+
@end
View
46 Classes/RootViewController.m
@@ -19,6 +19,7 @@
@implementation RootViewController
- (void)dealloc {
+ self.bannerView = nil;
[super dealloc];
}
@@ -47,6 +48,19 @@ - (void)viewDidLoad {
action:nil];
[self.navigationItem setBackBarButtonItem:backBarButtonItem];
[backBarButtonItem release];
+
+ Class clazz = NSClassFromString(@"ADBannerView");
+ if (clazz) {
+ self.bannerView = [[[ADBannerView alloc] initWithFrame:CGRectZero] autorelease];
+ self.bannerView.delegate = self;
+ if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 4.2f) {
+ self.bannerView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierPortrait, ADBannerContentSizeIdentifierLandscape, nil];
+ self.bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
+ } else {
+ self.bannerView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifier320x50, ADBannerContentSizeIdentifier480x32, nil];
+ self.bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
+ }
+ }
}
- (void)viewWillAppear:(BOOL)animated {
@@ -61,10 +75,27 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return settings.shouldAutoRotation;
}
+- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
+ Class clazz = NSClassFromString(@"ADBannerView");
+ if (clazz) {
+ if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {
+ self.bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier480x32;
+ } else {
+ self.bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
+ }
+ listView.tableHeaderView = self.bannerView;
+ }
+}
+
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
+- (void)viewDidUnload {
+ self.bannerView.delegate = nil;
+ self.bannerView = nil;
+}
+
#pragma mark -
- (BOOL)hasAccountSettings {
@@ -74,7 +105,7 @@ - (BOOL)hasAccountSettings {
NSString *password = settings.password;
BOOL done = NO;
- if ([username length] != 0 && [password length] != 0) {
+ if ([username length] > 0 && [password length] > 0) {
done = YES;
}
return done;
@@ -174,7 +205,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}
#pragma mark -
-#pragma mark Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger section = indexPath.section;
@@ -216,4 +246,16 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
}
+#pragma mark -
+
+- (void)bannerViewDidLoadAd:(ADBannerView *)banner {
+ listView.tableHeaderView = self.bannerView;
+}
+
+- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
+ listView.tableHeaderView = nil;
+ self.bannerView.delegate = nil;
+ self.bannerView = nil;
+}
+
@end
View
23 Classes/UIImage+ProportionalFill.m
@@ -12,9 +12,14 @@ @implementation UIImage (MGProportionalFill)
- (UIImage *)imageToFitSize:(CGSize)fitSize method:(MGImageResizingMethod)resizeMethod
-{
- float sourceWidth = [self size].width * self.scale;
- float sourceHeight = [self size].height * self.scale;
+{
+ CGFloat scale = 1.0f;
+ if ([self respondsToSelector:@selector(scale)]) {
+ scale = self.scale;
+ }
+
+ float sourceWidth = [self size].width * scale;
+ float sourceHeight = [self size].height * scale;
float targetWidth = fitSize.width;
float targetHeight = fitSize.height;
BOOL cropping = !(resizeMethod == MGImageResizeScale);
@@ -82,9 +87,17 @@ - (UIImage *)imageToFitSize:(CGSize)fitSize method:(MGImageResizingMethod)resize
// Create appropriately modified image.
UIImage *image;
- UIGraphicsBeginImageContextWithOptions(destRect.size, NO, 0.0); // 0.0 for scale means "correct scale for device's main screen".
+ if (UIGraphicsBeginImageContextWithOptions) {
+ UIGraphicsBeginImageContextWithOptions(destRect.size, NO, 0.0); // 0.0 for scale means "correct scale for device's main screen".
+ } else {
+ UIGraphicsBeginImageContext(destRect.size);
+ }
CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], sourceRect); // cropping happens here.
- image = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage.
+ if ([UIImage respondsToSelector:@selector(imageWithCGImage:scale:orientation:)]) {
+ image = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage.
+ } else {
+ image = [UIImage imageWithCGImage:sourceImg];
+ }
[image drawInRect:destRect]; // the actual scaling happens here, and orientation is taken care of automatically.
CGImageRelease(sourceImg);
image = UIGraphicsGetImageFromCurrentImageContext();
View
11 Classes/UserSettings.m
@@ -4,13 +4,6 @@
@implementation UserSettings
-@synthesize version;
-@synthesize userName;
-@synthesize password;
-@synthesize imageSize;
-@synthesize useMobileProxy;
-@synthesize shouldAutoRotation;
-
+ (UserSettings *)sharedInstance {
if (!sharedInstance) {
[UserSettings loadSettings];
@@ -21,7 +14,7 @@ + (UserSettings *)sharedInstance {
+ (void)loadSettings {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [paths objectAtIndex:0];
- NSString *path = [documentDirectory stringByAppendingPathComponent:@"userSettings.dat"];
+ NSString *path = [documentDirectory stringByAppendingPathComponent:@"UserSettings.dat"];
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:path]) {
@@ -52,7 +45,7 @@ + (void)loadSettings {
+ (void)saveSettings {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = [paths objectAtIndex:0];
- NSString *path = [documentDirectory stringByAppendingPathComponent:@"userSettings.dat"];
+ NSString *path = [documentDirectory stringByAppendingPathComponent:@"UserSettings.dat"];
NSMutableData *data = [NSMutableData data];
NSKeyedArchiver *encoder = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];
View
6 Classes/WebViewController.h
@@ -8,12 +8,16 @@
#import <UIKit/UIKit.h>
-@interface WebViewController : UIViewController<UIWebViewDelegate> {
+@interface WebViewController : UIViewController<UIWebViewDelegate, UIAlertViewDelegate, UIActionSheetDelegate> {
UIWebView *web;
UILabel *titleView;
UIBarButtonItem *commentButton;
+ UIBarButtonItem *bookmarkButton;
UIAlertView *alert;
+ UIActionSheet *sheet;
+
+ BOOL useMobilizer;
}
@property (nonatomic, retain) NSString *pageURL;
View
78 Classes/WebViewController.m
@@ -58,8 +58,8 @@ - (void)loadView {
UIBarButtonItem *forwardButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"NavForward.png"] style:UIBarButtonItemStylePlain target:web action:@selector(goForward)];
UIBarButtonItem *reloadButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:web action:@selector(reload)];
UIBarButtonItem *stopButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop target:web action:@selector(stopLoading)];
- UIBarButtonItem *bookmarkButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"bookmark_small.png"] style:UIBarButtonItemStylePlain target:self action:@selector(bookmark:)];
- UIBarButtonItem *actionButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:nil action:nil];
+ bookmarkButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"bookmark_small.png"] style:UIBarButtonItemStylePlain target:self action:@selector(bookmark:)];
+ UIBarButtonItem *actionButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(action:)];
[toolbar setItems:[NSArray arrayWithObjects:flexibleSpace, backButton, flexibleSpace, forwardButton, flexibleSpace, reloadButton, flexibleSpace, stopButton, flexibleSpace, bookmarkButton, flexibleSpace, actionButton, flexibleSpace, nil] animated:NO];
@@ -75,7 +75,9 @@ - (void)loadView {
- (void)viewDidLoad {
[super viewDidLoad];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ if (&UIApplicationDidEnterBackgroundNotification) {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+ }
titleView = [[UILabel alloc] initWithFrame:CGRectMake(0.0f, 45.0f, 200.0f, 36.0f)];
titleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
@@ -90,17 +92,21 @@ - (void)viewDidLoad {
[titleView release];
UserSettings *settings = [UserSettings sharedInstance];
- if (settings.useMobileProxy) {
+
+ bookmarkButton.enabled = [settings.userName length] > 0 && [settings.password length] > 0;
+
+ useMobilizer = settings.useMobileProxy;
+ if (useMobilizer) {
[web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://instapaper.com/m?u=%@", [self encodeString:self.pageURL]]]
- cachePolicy:NSURLRequestReturnCacheDataElseLoad
- timeoutInterval:20.0]];
+ cachePolicy:NSURLRequestUseProtocolCachePolicy
+ timeoutInterval:30.0]];
} else {
- [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.pageURL] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:20.0]];
+ [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.pageURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0]];
}
self.connection = [NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://b.hatena.ne.jp/entry/jsonlite/?url=%@", self.pageURL]]
- cachePolicy:NSURLRequestReturnCacheDataElseLoad
- timeoutInterval:20.0] delegate:self];
+ cachePolicy:NSURLRequestUseProtocolCachePolicy
+ timeoutInterval:30.0] delegate:self];
[self.connection start];
}
@@ -154,6 +160,14 @@ - (void)bookmark:(id)sender {
[navigationController release];
}
+- (void)action:(id)sender {
+ sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil)
+ destructiveButtonTitle:nil
+ otherButtonTitles:useMobilizer ? NSLocalizedString(@"OriginalPage", nil) : NSLocalizedString(@"UseMobilizer", nil), NSLocalizedString(@"OpenSafari", nil), nil];
+ [sheet showInView:self.view];
+ [sheet release];
+}
+
#pragma mark -
- (void)webViewDidStartLoad:(UIWebView *)webView {
@@ -169,13 +183,15 @@ - (void)webViewDidFinishLoad:(UIWebView *)webView {
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
[[NetworkActivityManager sharedInstance] popActivity:NSStringFromClass([self class])];
- alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
- message:[NSString stringWithFormat:@"%@", [error localizedDescription]]
- delegate:self
- cancelButtonTitle:nil
- otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
- [alert show];
- [alert release];
+ if ([error code] != -999) {
+ alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"AppName", nil)
+ message:[NSString stringWithFormat:@"%@", [error localizedDescription]]
+ delegate:self
+ cancelButtonTitle:nil
+ otherButtonTitles:NSLocalizedString(@"OK", nil), nil];
+ [alert show];
+ [alert release];
+ }
}
#pragma mark -
@@ -207,9 +223,39 @@ - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)
alert = nil;
}
+- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
+ if (buttonIndex == 0) {
+ [web stopLoading];
+
+ useMobilizer = !useMobilizer;
+ if (useMobilizer) {
+ [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://instapaper.com/m?u=%@", [self encodeString:self.pageURL]]]
+ cachePolicy:NSURLRequestUseProtocolCachePolicy
+ timeoutInterval:30.0]];
+ } else {
+ [web loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.pageURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0]];
+ }
+ } else if (buttonIndex == 1) {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:self.pageURL]];
+ }
+}
+
+- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
+ sheet = nil;
+}
+
- (void)applicationDidEnterBackground:(NSNotification *)note {
[alert dismissWithClickedButtonIndex:0 animated:NO];
alert = nil;
+
+ if (sheet) {
+ [sheet dismissWithClickedButtonIndex:2 animated:NO];
+ sheet = nil;
+ }
+
+ if (self.modalViewController) {
+ [self.modalViewController dismissModalViewControllerAnimated:NO];
+ }
}
@end
View
BIN  English.lproj/Localizable.strings
Binary file not shown
View
2  English.lproj/help.html
@@ -164,7 +164,7 @@
<li>Read, Edit, Delete your bookmarks.</li>
</ul>
<p>
-<strong>Hatena touch ver. 1.2.3</strong><br />
+<strong>Hatena touch ver. 1.2.4</strong><br />
<a href="http://kishikawakatsumi.com">KISHIKAWA Katsumi</a>
</p>
</body>
View
2  HatenaTouch-Info.plist
@@ -28,7 +28,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.2.3</string>
+ <string>1.2.4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
View
76 HatenaTouch.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 14043E1E120B432400262EC8 /* UIImage+ProportionalFill.m in Sources */ = {isa = PBXBuildFile; fileRef = 14043E1D120B432400262EC8 /* UIImage+ProportionalFill.m */; };
142595B311F27435005024A9 /* FotolifeUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = 142595B211F27435005024A9 /* FotolifeUploader.m */; };
1425960A11F27B9A005024A9 /* DiaryUploader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1425960911F27B9A005024A9 /* DiaryUploader.m */; };
14358EF511F7EED500D5F86D /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 14358EF411F7EED500D5F86D /* Reachability.m */; };
@@ -38,8 +39,6 @@
1467AC1111EB988100A5E334 /* SBJsonWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1467AC0B11EB988100A5E334 /* SBJsonWriter.m */; };
1467AC2E11EB9BA200A5E334 /* comments_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 1467AC2611EB9BA200A5E334 /* comments_small.png */; };
1467AC2F11EB9BA200A5E334 /* comments_small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1467AC2711EB9BA200A5E334 /* comments_small@2x.png */; };
- 14719F1311F546F300A799D9 /* book_w_bookmark_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 14719F0F11F546F300A799D9 /* book_w_bookmark_small.png */; };
- 14719F1411F546F300A799D9 /* book_w_bookmark_small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14719F1011F546F300A799D9 /* book_w_bookmark_small@2x.png */; };
14719F1511F546F300A799D9 /* bookmark_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 14719F1111F546F300A799D9 /* bookmark_small.png */; };
14719F1611F546F300A799D9 /* bookmark_small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14719F1211F546F300A799D9 /* bookmark_small@2x.png */; };
148966E211F102990013EBEC /* arrow_left_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 148966E011F102990013EBEC /* arrow_left_small.png */; };
@@ -65,8 +64,6 @@
14896FEF11F234D10013EBEC /* Diary.m in Sources */ = {isa = PBXBuildFile; fileRef = 14896FEE11F234D10013EBEC /* Diary.m */; };
14896FF711F23D6A0013EBEC /* NSString+XMLExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 14896FF611F23D6A0013EBEC /* NSString+XMLExtensions.m */; };
148970A411F249970013EBEC /* ImagePreviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 148970A311F249970013EBEC /* ImagePreviewViewController.m */; };
- 148970EA11F24EB50013EBEC /* UIImage+ProportionalFill.m in Sources */ = {isa = PBXBuildFile; fileRef = 148970E711F24EB50013EBEC /* UIImage+ProportionalFill.m */; };
- 148970EB11F24EB50013EBEC /* UIImage+Tint.m in Sources */ = {isa = PBXBuildFile; fileRef = 148970E911F24EB50013EBEC /* UIImage+Tint.m */; };
1489715A11F258E90013EBEC /* HatenaAtomPubResponseParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 1489715911F258E90013EBEC /* HatenaAtomPubResponseParser.m */; };
14DDEB1911F602CA0012958C /* HatenaSyntaxViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14DDEB1811F602CA0012958C /* HatenaSyntaxViewController.m */; };
14E280AC11F630B500DF10E5 /* HatenaSyntaxCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 14E280AB11F630B500DF10E5 /* HatenaSyntaxCell.m */; };
@@ -92,6 +89,8 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 14043E1C120B432400262EC8 /* UIImage+ProportionalFill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ProportionalFill.h"; sourceTree = "<group>"; };
+ 14043E1D120B432400262EC8 /* UIImage+ProportionalFill.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ProportionalFill.m"; sourceTree = "<group>"; };
142595B111F27435005024A9 /* FotolifeUploader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FotolifeUploader.h; sourceTree = "<group>"; };
142595B211F27435005024A9 /* FotolifeUploader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FotolifeUploader.m; sourceTree = "<group>"; };
1425960811F27B9A005024A9 /* DiaryUploader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiaryUploader.h; sourceTree = "<group>"; };
@@ -145,8 +144,6 @@
1467AC0B11EB988100A5E334 /* SBJsonWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SBJsonWriter.m; sourceTree = "<group>"; };
1467AC2611EB9BA200A5E334 /* comments_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = comments_small.png; sourceTree = "<group>"; };
1467AC2711EB9BA200A5E334 /* comments_small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "comments_small@2x.png"; sourceTree = "<group>"; };
- 14719F0F11F546F300A799D9 /* book_w_bookmark_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = book_w_bookmark_small.png; sourceTree = "<group>"; };
- 14719F1011F546F300A799D9 /* book_w_bookmark_small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "book_w_bookmark_small@2x.png"; sourceTree = "<group>"; };
14719F1111F546F300A799D9 /* bookmark_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bookmark_small.png; sourceTree = "<group>"; };
14719F1211F546F300A799D9 /* bookmark_small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bookmark_small@2x.png"; sourceTree = "<group>"; };
148966E011F102990013EBEC /* arrow_left_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = arrow_left_small.png; sourceTree = "<group>"; };
@@ -187,10 +184,6 @@
14896FF611F23D6A0013EBEC /* NSString+XMLExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+XMLExtensions.m"; sourceTree = "<group>"; };
148970A211F249970013EBEC /* ImagePreviewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImagePreviewViewController.h; sourceTree = "<group>"; };
148970A311F249970013EBEC /* ImagePreviewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImagePreviewViewController.m; sourceTree = "<group>"; };
- 148970E611F24EB50013EBEC /* UIImage+ProportionalFill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ProportionalFill.h"; sourceTree = "<group>"; };
- 148970E711F24EB50013EBEC /* UIImage+ProportionalFill.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ProportionalFill.m"; sourceTree = "<group>"; };
- 148970E811F24EB50013EBEC /* UIImage+Tint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Tint.h"; sourceTree = "<group>"; };
- 148970E911F24EB50013EBEC /* UIImage+Tint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Tint.m"; sourceTree = "<group>"; };
1489715811F258E90013EBEC /* HatenaAtomPubResponseParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HatenaAtomPubResponseParser.h; sourceTree = "<group>"; };
1489715911F258E90013EBEC /* HatenaAtomPubResponseParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HatenaAtomPubResponseParser.m; sourceTree = "<group>"; };
14DDEB1711F602CA0012958C /* HatenaSyntaxViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HatenaSyntaxViewController.h; sourceTree = "<group>"; };
@@ -315,6 +308,8 @@
1467ABBC11EB89DD00A5E334 /* NavBack@2x.png */,
1467ABBF11EB89DD00A5E334 /* NavForward.png */,
1467ABC011EB89DD00A5E334 /* NavForward@2x.png */,
+ 14719F1111F546F300A799D9 /* bookmark_small.png */,
+ 14719F1211F546F300A799D9 /* bookmark_small@2x.png */,
1467AC2611EB9BA200A5E334 /* comments_small.png */,
1467AC2711EB9BA200A5E334 /* comments_small@2x.png */,
14896FB211F22E1C0013EBEC /* clipboard_small.png */,
@@ -323,14 +318,10 @@
14896FBB11F22E380013EBEC /* images_small@2x.png */,
14896FB611F22E280013EBEC /* camera_small.png */,
14896FB711F22E280013EBEC /* camera_small@2x.png */,
- 14F66B5A11F4A502009A123B /* dotted-pattern.png */,
- 14F66B5B11F4A502009A123B /* dotted-pattern@2x.png */,
14F66BD811F4B0B7009A123B /* dot.png */,
14F66BCF11F4B088009A123B /* dot@2x.png */,
- 14719F0F11F546F300A799D9 /* book_w_bookmark_small.png */,
- 14719F1011F546F300A799D9 /* book_w_bookmark_small@2x.png */,
- 14719F1111F546F300A799D9 /* bookmark_small.png */,
- 14719F1211F546F300A799D9 /* bookmark_small@2x.png */,
+ 14F66B5A11F4A502009A123B /* dotted-pattern.png */,
+ 14F66B5B11F4A502009A123B /* dotted-pattern@2x.png */,
);
name = Images;
sourceTree = "<group>";
@@ -434,10 +425,8 @@
148970EC11F24EBF0013EBEC /* MGImageUtilities */ = {
isa = PBXGroup;
children = (
- 148970E611F24EB50013EBEC /* UIImage+ProportionalFill.h */,
- 148970E711F24EB50013EBEC /* UIImage+ProportionalFill.m */,
- 148970E811F24EB50013EBEC /* UIImage+Tint.h */,
- 148970E911F24EB50013EBEC /* UIImage+Tint.m */,
+ 14043E1C120B432400262EC8 /* UIImage+ProportionalFill.h */,
+ 14043E1D120B432400262EC8 /* UIImage+ProportionalFill.m */,
);
name = MGImageUtilities;
sourceTree = "<group>";
@@ -525,6 +514,7 @@
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HatenaTouch" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -574,8 +564,6 @@
14F66C2E11F4C991009A123B /* Icon-Small@2x.png in Resources */,
14F66C5511F4CD02009A123B /* Default@2x.png in Resources */,
14F66C5611F4CD02009A123B /* Default.png in Resources */,
- 14719F1311F546F300A799D9 /* book_w_bookmark_small.png in Resources */,
- 14719F1411F546F300A799D9 /* book_w_bookmark_small@2x.png in Resources */,
14719F1511F546F300A799D9 /* bookmark_small.png in Resources */,
14719F1611F546F300A799D9 /* bookmark_small@2x.png in Resources */,
14358F6211F7F5E300D5F86D /* help.html in Resources */,
@@ -620,8 +608,6 @@
14896FEF11F234D10013EBEC /* Diary.m in Sources */,
14896FF711F23D6A0013EBEC /* NSString+XMLExtensions.m in Sources */,
148970A411F249970013EBEC /* ImagePreviewViewController.m in Sources */,
- 148970EA11F24EB50013EBEC /* UIImage+ProportionalFill.m in Sources */,
- 148970EB11F24EB50013EBEC /* UIImage+Tint.m in Sources */,
1489715A11F258E90013EBEC /* HatenaAtomPubResponseParser.m in Sources */,
142595B311F27435005024A9 /* FotolifeUploader.m in Sources */,
1425960A11F27B9A005024A9 /* DiaryUploader.m in Sources */,
@@ -632,6 +618,7 @@
14358EF511F7EED500D5F86D /* Reachability.m in Sources */,
14358F1B11F7F38E00D5F86D /* InternetReachability.m in Sources */,
14358F6511F7F5F800D5F86D /* HelpViewController.m in Sources */,
+ 14043E1E120B432400262EC8 /* UIImage+ProportionalFill.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -668,6 +655,41 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 143E7E2111F8EC0B001938D1 /* Distribution */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Katsumi Kishikawa";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = "${SDKROOT}/usr/include/libxml2";
+ IPHONEOS_DEPLOYMENT_TARGET = 3.0;
+ OTHER_CFLAGS = (
+ "-Xclang",
+ "-fobjc-nonfragile-abi2",
+ "-DNS_BLOCK_ASSERTIONS=1",
+ );
+ PREBINDING = NO;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "504D5F1F-DEBD-4F02-BF31-BE890E468BA3";
+ SDKROOT = iphoneos;
+ };
+ name = Distribution;
+ };
+ 143E7E2211F8EC0B001938D1 /* Distribution */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = HatenaTouch_Prefix.pch;
+ INFOPLIST_FILE = "HatenaTouch-Info.plist";
+ PRODUCT_NAME = HatenaTouch;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Distribution;
+ };
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -712,7 +734,7 @@
);
PREBINDING = NO;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- SDKROOT = iphoneos4.0;
+ SDKROOT = iphoneos;
};
name = Debug;
};
@@ -734,7 +756,7 @@
);
PREBINDING = NO;
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
- SDKROOT = iphoneos4.0;
+ SDKROOT = iphoneos;
};
name = Release;
};
@@ -746,6 +768,7 @@
buildConfigurations = (
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
+ 143E7E2211F8EC0B001938D1 /* Distribution */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -755,6 +778,7 @@
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
+ 143E7E2111F8EC0B001938D1 /* Distribution */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
View
1  HatenaTouch_Prefix.pch
@@ -7,7 +7,6 @@
#warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif
-
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
View
BIN  Japanese.lproj/Localizable.strings
Binary file not shown
View
2  Japanese.lproj/help.html
@@ -162,7 +162,7 @@
<li>Myブックマークの閲覧・修正・削除</li>
</ul>
<p>
-<strong>はてな touch ver. 1.2.3</strong><br />
+<strong>はてな touch ver. 1.2.4</strong><br />
<a href="http://kishikawakatsumi.com">KISHIKAWA Katsumi</a>
</p>
</body>
Please sign in to comment.
Something went wrong with that request. Please try again.