diff --git a/Leanote/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/Leanote/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png index 824fe5f..147596b 100644 Binary files a/Leanote/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png and b/Leanote/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png differ diff --git a/Leanote/Images.xcassets/LaunchImage.launchimage/start-retina.png b/Leanote/Images.xcassets/LaunchImage.launchimage/start-retina.png index 80e0460..41c704e 100644 Binary files a/Leanote/Images.xcassets/LaunchImage.launchimage/start-retina.png and b/Leanote/Images.xcassets/LaunchImage.launchimage/start-retina.png differ diff --git a/Leanote/controller/note/NoteViewController.m b/Leanote/controller/note/NoteViewController.m index e4edda6..ed3e18d 100644 --- a/Leanote/controller/note/NoteViewController.m +++ b/Leanote/controller/note/NoteViewController.m @@ -24,6 +24,7 @@ #import "UIImage+Util.h" #import "WPFontManager.h" #import "WPStyleGuide.h" + #import #import @@ -447,8 +448,8 @@ BOOL hiddenBar = NO; - (void)editorDidPressMedia:(WPEditorViewController *)editorController { -// [self showPhotoPickerForBetterDevice]; -// return; + [self showPhotoPickerForBetterDevice]; + return; // iphone if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"Add Photo", nil) message:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) otherButtonTitles:NSLocalizedString(@"Photo Library", nil),NSLocalizedString(@"Take Photo", nil), nil]; @@ -702,7 +703,7 @@ BOOL hiddenBar = NO; QBImagePickerController *imagePickerController = [QBImagePickerController new]; imagePickerController.delegate = self; imagePickerController.allowsMultipleSelection = YES; - imagePickerController.maximumNumberOfSelection = 6; + imagePickerController.maximumNumberOfSelection = 1; imagePickerController.showsNumberOfSelectedAssets = YES; imagePickerController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentViewController:imagePickerController animated:YES completion:NULL]; @@ -806,15 +807,20 @@ BOOL hiddenBar = NO; } - (void)addMediaAssets:(NSArray *)assets { - NSString *urls = @"["; + NSMutableArray * array = [[ NSMutableArray alloc]init]; +// NSString *urls = @"["; for (ALAsset *asset in assets) { NSString *fileId = [self addImageAssetToContent:asset]; - urls = [NSString stringWithFormat:@"%@'%@',", urls, [self getImageUrl:fileId]]; +// urls = [NSString stringWithFormat:@"%@'%@',", urls, [self getImageUrl:fileId]]; + [array addObject:[self getImageUrl:fileId]]; } - urls = [NSString stringWithFormat:@"%@]", urls]; +// urls = [NSString stringWithFormat:@"%@]", urls]; dispatch_async(dispatch_get_main_queue(), ^{ - [self.editorView insertImage:urls alt:@""]; +// [self.editorView insertImage:urls alt:@""]; + for (NSString *object in array) { + [self.editorView insertImage:object alt:@""]; + } }); } diff --git a/Leanote/view/LeaWebViewController.h b/Leanote/view/LeaWebViewController.h index e4b2a97..a5d9c3c 100755 --- a/Leanote/view/LeaWebViewController.h +++ b/Leanote/view/LeaWebViewController.h @@ -4,7 +4,7 @@ @interface LeaWebViewController : UIViewController // Interface -@property (nonatomic, weak) IBOutlet WKWebView *webView; +@property (nonatomic, strong) IBOutlet WKWebView *webView; //@property (nonatomic, weak) IBOutlet WKWebView *wkView; @property (nonatomic, strong) IBOutlet UIToolbar *toolbar; @property (nonatomic, strong) IBOutlet UIView *loadingView; diff --git a/Leanote/view/LeaWebViewController.m b/Leanote/view/LeaWebViewController.m index 388a9b4..87f4e83 100755 --- a/Leanote/view/LeaWebViewController.m +++ b/Leanote/view/LeaWebViewController.m @@ -373,6 +373,7 @@ return (content || '').trim().substr(0, 50);\ })();\ "; + // js = @"document.body.outerHTML"; //执行JS [self.webView evaluateJavaScript:js completionHandler:^(id _Nullable result, NSError * _Nullable error) { NSLog(@"get desc ret %@ %@", error, result); @@ -599,17 +600,18 @@ NSString* permaLink = [self getDocumentPermalink]; NSString *title = [self getDocumentTitle]; + dispatch_async(dispatch_get_main_queue(), ^{ [self getDocumentDesc:^(NSString *desc){ - NSLog(@"showLinkOptions desc: %@", desc); + NSLog(@"showLinkOptions link: %@, title: %@, desc: %@", permaLink, title, desc); NSMutableArray *activityItems = [NSMutableArray array]; if (title) { [activityItems addObject:title]; } - if (desc) { - [activityItems addObject:desc]; - } +// if (desc) { +// [activityItems addObject:desc]; +// } // weixin NSArray *activities = @[[[WeixinSessionActivity alloc] init], [[WeixinTimelineActivity alloc] init]]; @@ -624,7 +626,7 @@ if (!completed) { return; } - // [WPActivityDefaults trackActivityType:activityType]; + // [WPActivityDefaults trackActivityType:activityType]; }; if (IS_IPAD) { @@ -639,6 +641,7 @@ [self presentViewController:activityViewController animated:YES completion:nil]; } }]; + }); } - (void)reload