diff --git a/media/iphone/Classes/NewsBlurAppDelegate.h b/media/iphone/Classes/NewsBlurAppDelegate.h index 9d02dafde..c7fd197da 100644 --- a/media/iphone/Classes/NewsBlurAppDelegate.h +++ b/media/iphone/Classes/NewsBlurAppDelegate.h @@ -107,6 +107,7 @@ - (void)addedGoogleReader; - (void)showLogin; - (void)showAdd; +- (void)showPopover; - (void)showMoveSite; - (void)loadFeedDetailView; - (void)loadRiverFeedDetailView; diff --git a/media/iphone/Classes/NewsBlurAppDelegate.m b/media/iphone/Classes/NewsBlurAppDelegate.m index 5eace14f8..965f47b70 100644 --- a/media/iphone/Classes/NewsBlurAppDelegate.m +++ b/media/iphone/Classes/NewsBlurAppDelegate.m @@ -174,6 +174,12 @@ [firstTimeUserViewController selectGoogleReaderButton]; } +- (void)showPopover { + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + [splitStoryDetailViewController showPopover]; + } +} + - (void)showAdd { UINavigationController *navController = self.navigationController; [addSiteViewController initWithNibName:nil bundle:nil]; diff --git a/media/iphone/NewsBlur.xcodeproj/project.pbxproj b/media/iphone/NewsBlur.xcodeproj/project.pbxproj index b3fea11db..4cdcf24dd 100755 --- a/media/iphone/NewsBlur.xcodeproj/project.pbxproj +++ b/media/iphone/NewsBlur.xcodeproj/project.pbxproj @@ -59,6 +59,7 @@ 4307BEE41565EDF8007A932A /* warning.png in Resources */ = {isa = PBXBuildFile; fileRef = 4307BE7F1565EDF8007A932A /* warning.png */; }; 4307BEE61565EDF8007A932A /* world.png in Resources */ = {isa = PBXBuildFile; fileRef = 4307BE801565EDF8007A932A /* world.png */; }; 4307BEFE1565EEBC007A932A /* Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 4307BEFD1565EEBC007A932A /* Base64.m */; }; + 430AD52D158D62A40092E1CF /* storyDetailView.js in Sources */ = {isa = PBXBuildFile; fileRef = 430AD52C158D62A40092E1CF /* storyDetailView.js */; }; 433323B015886FA80025064D /* logo_newsblur.png in Resources */ = {isa = PBXBuildFile; fileRef = 433323AF15886FA80025064D /* logo_newsblur.png */; }; 433323B8158901A40025064D /* fountain_pen.png in Resources */ = {isa = PBXBuildFile; fileRef = 433323B6158901A40025064D /* fountain_pen.png */; }; 433323B9158901A40025064D /* fountain_pen@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 433323B7158901A40025064D /* fountain_pen@2x.png */; }; @@ -268,6 +269,7 @@ 4307BE801565EDF8007A932A /* world.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = world.png; sourceTree = ""; }; 4307BEFC1565EEBC007A932A /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = ""; }; 4307BEFD1565EEBC007A932A /* Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Base64.m; sourceTree = ""; }; + 430AD52C158D62A40092E1CF /* storyDetailView.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = storyDetailView.js; sourceTree = ""; }; 433323AF15886FA80025064D /* logo_newsblur.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo_newsblur.png; sourceTree = ""; }; 433323B6158901A40025064D /* fountain_pen.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fountain_pen.png; sourceTree = ""; }; 433323B7158901A40025064D /* fountain_pen@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fountain_pen@2x.png"; sourceTree = ""; }; @@ -599,6 +601,7 @@ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { isa = PBXGroup; children = ( + 430AD52C158D62A40092E1CF /* storyDetailView.js */, 43801386158A4E21006C7E37 /* style.css */, 1D3623240D0F684500981E51 /* NewsBlurAppDelegate.h */, 1D3623250D0F684500981E51 /* NewsBlurAppDelegate.m */, @@ -1433,6 +1436,7 @@ 43C1E6401583DA3F006874F1 /* SplitStoryDetailViewController.m in Sources */, 433323CD158968ED0025064D /* FirstTimeUserViewController.m in Sources */, 43C95C48158BEC450086C69B /* GoogleReaderViewController.m in Sources */, + 430AD52D158D62A40092E1CF /* storyDetailView.js in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/media/iphone/SplitStoryDetailViewController.h b/media/iphone/SplitStoryDetailViewController.h index 085970180..a23579974 100644 --- a/media/iphone/SplitStoryDetailViewController.h +++ b/media/iphone/SplitStoryDetailViewController.h @@ -18,4 +18,6 @@ @property (nonatomic, retain) IBOutlet NewsBlurAppDelegate *appDelegate; @property (strong, nonatomic) UIPopoverController *masterPopoverController; +- (void)showPopover; + @end diff --git a/media/iphone/SplitStoryDetailViewController.m b/media/iphone/SplitStoryDetailViewController.m index 34ee98ba4..cd6efe643 100644 --- a/media/iphone/SplitStoryDetailViewController.m +++ b/media/iphone/SplitStoryDetailViewController.m @@ -38,10 +38,11 @@ - (void)viewDidAppear:(BOOL)animated { if (self.masterPopoverController) { - [self.masterPopoverController presentPopoverFromRect:CGRectMake(0, 0, 1, 1) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO]; + [self.masterPopoverController presentPopoverFromRect:CGRectMake(0, 0, 1, 1) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } } + - (void)viewDidUnload { [super viewDidUnload]; @@ -57,13 +58,20 @@ [appDelegate adjustStoryDetailWebView]; } +- (void)showPopover { + if (self.masterPopoverController) { + [self.masterPopoverController presentPopoverFromRect:CGRectMake(0, 0, 1, 1) inView:self.view + permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } +} + #pragma mark - Split view - (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UIViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController { barButtonItem.title = NSLocalizedString(@"NewsBlur", @"NewsBlur"); [self.navigationItem setLeftBarButtonItem:barButtonItem animated:YES]; - self.masterPopoverController = popoverController; + self.masterPopoverController = popoverController; } - (void)splitViewController:(UISplitViewController *)splitController willShowViewController:(UIViewController *)viewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem diff --git a/media/iphone/storyDetailView.js b/media/iphone/storyDetailView.js new file mode 100644 index 000000000..e69de29bb diff --git a/media/iphone/style.css b/media/iphone/style.css index 5a10f9de0..78e88f5d3 100644 --- a/media/iphone/style.css +++ b/media/iphone/style.css @@ -31,7 +31,7 @@ img.NB-image { } .NB-no-style img { - margin: 1em; + margin: 0 1em 0 0; display: inline-block; border: 0; background: none;