mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
adding in NewsBlur title to main view
This commit is contained in:
parent
4ea57a9276
commit
c90d16836d
4 changed files with 20 additions and 5 deletions
|
@ -72,6 +72,7 @@
|
||||||
|
|
||||||
splitStoryDetailNavigationController.viewControllers = [NSArray arrayWithObject:detailViewController];
|
splitStoryDetailNavigationController.viewControllers = [NSArray arrayWithObject:detailViewController];
|
||||||
splitStoryDetailNavigationController.navigationBar.tintColor = [UIColor colorWithRed:0.16f green:0.36f blue:0.46 alpha:0.9];
|
splitStoryDetailNavigationController.navigationBar.tintColor = [UIColor colorWithRed:0.16f green:0.36f blue:0.46 alpha:0.9];
|
||||||
|
detailViewController.navigationItem.title = @"NewsBlur";
|
||||||
|
|
||||||
[window addSubview:splitStoryController.view];
|
[window addSubview:splitStoryController.view];
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,6 @@
|
||||||
|
|
||||||
|
|
||||||
// remove the right detail view in storySplitController
|
// remove the right detail view in storySplitController
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){
|
||||||
NSArray *subviews = [[appDelegate.detailViewController.view subviews] copy];
|
NSArray *subviews = [[appDelegate.detailViewController.view subviews] copy];
|
||||||
for (UIView *subview in subviews) {
|
for (UIView *subview in subviews) {
|
||||||
|
@ -118,8 +117,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[subviews release];
|
[subviews release];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appDelegate.detailViewController.navigationItem.titleView = nil;
|
||||||
|
appDelegate.detailViewController.navigationItem.title = @"NewsBlur";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)viewDidAppear:(BOOL)animated {
|
- (void)viewDidAppear:(BOOL)animated {
|
||||||
|
|
|
@ -160,6 +160,8 @@
|
||||||
- (BOOL)webView:(UIWebView *)webView
|
- (BOOL)webView:(UIWebView *)webView
|
||||||
shouldStartLoadWithRequest:(NSURLRequest *)request
|
shouldStartLoadWithRequest:(NSURLRequest *)request
|
||||||
navigationType:(UIWebViewNavigationType)navigationType {
|
navigationType:(UIWebViewNavigationType)navigationType {
|
||||||
|
|
||||||
|
|
||||||
if ([[[request URL] scheme] isEqual:@"mailto"]) {
|
if ([[[request URL] scheme] isEqual:@"mailto"]) {
|
||||||
[[UIApplication sharedApplication] openURL:[request URL]];
|
[[UIApplication sharedApplication] openURL:[request URL]];
|
||||||
return NO;
|
return NO;
|
||||||
|
@ -167,6 +169,11 @@
|
||||||
[self updateAddress:request];
|
[self updateAddress:request];
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NSURL* mainUrl = [request mainDocumentURL];
|
||||||
|
NSString* absoluteString = [mainUrl absoluteString];
|
||||||
|
self.pageUrl.text = absoluteString;
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#import "StoryDetailViewController.h"
|
#import "StoryDetailViewController.h"
|
||||||
#import "NewsBlurAppDelegate.h"
|
#import "NewsBlurAppDelegate.h"
|
||||||
#import "FeedDetailViewController.h"
|
#import "FeedDetailViewController.h"
|
||||||
|
#import "DetailViewController.h"
|
||||||
#import "ASIHTTPRequest.h"
|
#import "ASIHTTPRequest.h"
|
||||||
#import "ASIFormDataRequest.h"
|
#import "ASIFormDataRequest.h"
|
||||||
#import "Base64.h"
|
#import "Base64.h"
|
||||||
|
@ -94,7 +95,12 @@
|
||||||
target:self
|
target:self
|
||||||
action:@selector(showOriginalSubview:)
|
action:@selector(showOriginalSubview:)
|
||||||
];
|
];
|
||||||
self.navigationItem.rightBarButtonItem = originalButton;
|
if (UI_USER_INTERFACE_IDIOM()== UIUserInterfaceIdiomPad) {
|
||||||
|
appDelegate.detailViewController.navigationItem.rightBarButtonItem = originalButton;
|
||||||
|
} else {
|
||||||
|
self.navigationItem.rightBarButtonItem = originalButton;
|
||||||
|
}
|
||||||
|
|
||||||
[originalButton release];
|
[originalButton release];
|
||||||
|
|
||||||
[super viewDidAppear:animated];
|
[super viewDidAppear:animated];
|
||||||
|
@ -147,13 +153,13 @@
|
||||||
" font-weight: 600;"
|
" font-weight: 600;"
|
||||||
" background-color: #E0E0E0;"
|
" background-color: #E0E0E0;"
|
||||||
" border-bottom: 1px solid #A0A0A0;"
|
" border-bottom: 1px solid #A0A0A0;"
|
||||||
" padding: 20px 36px 20px;"
|
" padding: 20px 24px 20px;"
|
||||||
" text-shadow: 1px 1px 0 #EFEFEF;"
|
" text-shadow: 1px 1px 0 #EFEFEF;"
|
||||||
" overflow: hidden;"
|
" overflow: hidden;"
|
||||||
" max-width: none;"
|
" max-width: none;"
|
||||||
"}"
|
"}"
|
||||||
".NB-story {"
|
".NB-story {"
|
||||||
" margin: 20px 36px;"
|
" margin: 20px 24px;"
|
||||||
"}"
|
"}"
|
||||||
".NB-story-author {"
|
".NB-story-author {"
|
||||||
" color: #969696;"
|
" color: #969696;"
|
||||||
|
|
Loading…
Add table
Reference in a new issue