diff --git a/media/iphone/Classes/FeedDetailViewController.m b/media/iphone/Classes/FeedDetailViewController.m index e0afe7eb3..d234584e9 100644 --- a/media/iphone/Classes/FeedDetailViewController.m +++ b/media/iphone/Classes/FeedDetailViewController.m @@ -54,6 +54,10 @@ [super viewDidLoad]; } +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); +} + - (void)viewWillAppear:(BOOL)animated { self.pageFinished = NO; [MBProgressHUD hideHUDForView:self.view animated:YES]; diff --git a/media/iphone/Classes/NewsBlurAppDelegate.m b/media/iphone/Classes/NewsBlurAppDelegate.m index f56ccb006..67a77a1cb 100644 --- a/media/iphone/Classes/NewsBlurAppDelegate.m +++ b/media/iphone/Classes/NewsBlurAppDelegate.m @@ -634,7 +634,7 @@ [gradientView addSubview:titleImageView]; } else { gradientView = [NewsBlurAppDelegate - makeGradientView:CGRectMake(0, -1, window.frame.size.width, 10) + makeGradientView:CGRectMake(0, -1, 1024, 10) // hard coding the 1024 as a hack for window.frame.size.width startColor:[feed objectForKey:@"favicon_color"] endColor:[feed objectForKey:@"favicon_fade"]]; } diff --git a/media/iphone/Classes/NewsBlurViewController.m b/media/iphone/Classes/NewsBlurViewController.m index 01212dc2c..9ef05c096 100644 --- a/media/iphone/Classes/NewsBlurViewController.m +++ b/media/iphone/Classes/NewsBlurViewController.m @@ -117,17 +117,9 @@ [super viewWillDisappear:animated]; } -/* - // Override to allow orientations other than the default portrait orientation. - - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - // Return YES for supported orientations - return (interfaceOrientation == UIInterfaceOrientationPortrait); - } - */ - -- (BOOL)shouldAutorotateToInterfaceOrientation: -(UIInterfaceOrientation)toInterfaceOrientation { - return YES; +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations + return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } - (void)didReceiveMemoryWarning { diff --git a/media/iphone/Classes/OriginalStoryViewController.m b/media/iphone/Classes/OriginalStoryViewController.m index 904d92645..910332ec9 100644 --- a/media/iphone/Classes/OriginalStoryViewController.m +++ b/media/iphone/Classes/OriginalStoryViewController.m @@ -48,6 +48,10 @@ } } +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); +} + - (void)viewDidLoad { CGRect navBarFrame = self.view.bounds; diff --git a/media/iphone/Classes/StoryDetailViewController.m b/media/iphone/Classes/StoryDetailViewController.m index f978a7b59..155a0341b 100644 --- a/media/iphone/Classes/StoryDetailViewController.m +++ b/media/iphone/Classes/StoryDetailViewController.m @@ -64,17 +64,13 @@ initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease]; - UIScrollView* currentScrollView; - for (UIView* subView in self.webView.subviews) { - if ([subView isKindOfClass:[UIScrollView class]]) { - currentScrollView = (UIScrollView*)subView; - currentScrollView.delegate = self; - } - } - [super viewDidLoad]; } +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); +} + - (void)viewWillAppear:(BOOL)animated { // NSLog(@"Stories; %@ -- %@ (%d)", self.activeStoryId, [appDelegate.activeStory objectForKey:@"id"], self.activeStoryId == [appDelegate.activeStory objectForKey:@"id"]); id storyId = [appDelegate.activeStory objectForKey:@"id"]; @@ -205,7 +201,7 @@ " display: none;" "}" "" - ""]; + ""]; } else { imgCssString = [NSString stringWithFormat:@"" - ""]; + ""]; } NSString *story_author = @""; if ([appDelegate.activeStory objectForKey:@"story_authors"]) { @@ -335,7 +331,7 @@ [appDelegate.activeStory objectForKey:@"story_feed_id"]]]; self.feedTitleGradient = [appDelegate makeFeedTitleGradient:feed - withRect:CGRectMake(0, -1, self.webView.frame.size.width, 21)]; + withRect:CGRectMake(0, -1, 1024, 21)]; // 1024 hack for self.webView.frame.size.width self.feedTitleGradient.tag = 12; // Not attached yet. Remove old gradients, first. for (UIView *subview in self.webView.subviews) {