mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
fixing some bugs in sharing modal
This commit is contained in:
parent
b9822202ff
commit
a48281b803
3 changed files with 14 additions and 6 deletions
|
@ -270,6 +270,8 @@
|
|||
|
||||
self.shareViewController.view.hidden = NO;
|
||||
|
||||
|
||||
|
||||
[UIView animateWithDuration:0.35 animations:^{
|
||||
self.shareViewController.view.frame = CGRectMake(0,
|
||||
newShareYCoordinate,
|
||||
|
@ -310,6 +312,7 @@
|
|||
- (void)hideShareView:(BOOL)resetComment {
|
||||
if (resetComment) {
|
||||
self.shareViewController.commentField.text = @"";
|
||||
[self.shareViewController.commentField resignFirstResponder];
|
||||
}
|
||||
|
||||
self.isShowingShare = NO;
|
||||
|
|
|
@ -270,7 +270,12 @@
|
|||
animations:^{
|
||||
self.view.frame = shareViewFrame;
|
||||
appDelegate.storyDetailViewController.webView.frame = storyDetailViewFrame;
|
||||
} completion:nil];
|
||||
} completion:^(BOOL finished) {
|
||||
[appDelegate.storyDetailViewController scrolltoBottom];
|
||||
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -389,7 +389,7 @@
|
|||
headerString = [NSString stringWithFormat:@
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"reader.css\" >"
|
||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"storyDetailView.css\" >"
|
||||
"<meta name=\"viewport\" id=\"\viewport\" content=\"width=%i, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\"/>",
|
||||
"<meta name=\"viewport\" id=\"viewport\" content=\"width=%i, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\"/>",
|
||||
|
||||
|
||||
contentWidth];
|
||||
|
@ -724,9 +724,8 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
|||
}
|
||||
|
||||
- (void)scrolltoBottom {
|
||||
NSString *jsString = [[NSString alloc] initWithFormat:@
|
||||
"window.scrollTo(0, document.body.scrollHeight);"];
|
||||
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
|
||||
CGPoint bottomOffset = CGPointMake(0, self.webView.scrollView.contentSize.height - self.webView.bounds.size.height);
|
||||
[self.webView.scrollView setContentOffset:bottomOffset animated:YES];
|
||||
}
|
||||
|
||||
|
||||
|
@ -852,7 +851,8 @@ shouldStartLoadWithRequest:(NSURLRequest *)request
|
|||
}
|
||||
|
||||
NSString *jsString = [[NSString alloc] initWithFormat:
|
||||
@"document.getElementsByTagName('body')[0].setAttribute('class', '%@');document.getElementById(\"viewport\").setAttribute(\"content\", \"width=%i;initial-scale=1; maximum-scale=1.0; user-scalable=0;\");",
|
||||
@"document.getElementsByTagName('body')[0].setAttribute('class', '%@');"
|
||||
"document.getElementById(\"viewport\").setAttribute(\"content\", \"width=%i;initial-scale=1; maximum-scale=1.0; user-scalable=0;\");",
|
||||
contentWidthClass,
|
||||
contentWidth];
|
||||
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
|
||||
|
|
Loading…
Add table
Reference in a new issue