Skip to content

Commit

Permalink
add icon and init files
Browse files Browse the repository at this point in the history
  • Loading branch information
liaojinxing committed Jun 12, 2014
1 parent 0b3c806 commit 1390c40
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Voice2Note.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@
"$(PROJECT_DIR)/Framework/Weixin",
);
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand All @@ -586,6 +587,7 @@
"$(PROJECT_DIR)/Framework/Weixin",
);
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
17 changes: 17 additions & 0 deletions Voice2Note/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
#import "VNConstants.h"
#import "WXApi.h"
#import "Colours.h"
#import "VNNote.h"
#import "VNNoteManager.h"


@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[self addInitFileIfNeeded];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];

Expand Down Expand Up @@ -62,4 +66,17 @@ - (void)applicationWillTerminate:(UIApplication *)application
}


- (void)addInitFileIfNeeded
{
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
if (![userDefaults objectForKey:@"hasInitFile"]) {
VNNote *note = [[VNNote alloc] initWithTitle:NSLocalizedString(@"AboutTitle", @"")
content:NSLocalizedString(@"AboutText", @"")
createdDate:[NSDate date]
updateDate:[NSDate date]];
[[VNNoteManager sharedManager] storeNote:note];
[userDefaults setBool:YES forKey:@"hasInitFile"];
}
}

@end
4 changes: 4 additions & 0 deletions Voice2Note/Resource/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@
"InputViewTitle" = "标题";
"InputViewText" = "正文";
"InputTextNoData" = "请输入文字";

// About
"AboutTitle" = "关于懒人笔记";
"AboutText" = "懒人笔记是一款为懒人设计的笔记本,你只需要通过语音输入,即可完成笔记的书写。\n同时支持发邮件,分享到朋友圈等附加功能。\n大部分情况下你无需动笔,只需要靠说,就可以轻松发邮件,是提高效率的好工具。\n开发者:http://github.com/liaojinxing";
Binary file added Voice2Note/Resource/logo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Voice2Note/Resource/logo/logo_120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Voice2Note/Resource/logo/logo_58.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Voice2Note/Resource/logo/logo_80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Voice2Note/Resource/logo/spalash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Voice2Note/Resource/logo/spalash_960.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion Voice2Note/Source/Controller/NoteDetailController.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ - (void)onResult:(NSArray *)resultArray isLast:(BOOL)isLast
for (NSString *key in dic) {
[result appendFormat:@"%@", key];
}
_contentTextView.text = [NSString stringWithFormat:@"%@%@", _contentTextView.text, result];
if ([_titleTextField isFirstResponder]) {
_titleTextField.text = [NSString stringWithFormat:@"%@%@", _titleTextField.text, result];
} else {
_contentTextView.text = [NSString stringWithFormat:@"%@%@", _contentTextView.text, result];
}
}

- (void)onError:(IFlySpeechError *)error
Expand Down

0 comments on commit 1390c40

Please sign in to comment.