Skip to content

Commit

Permalink
#817 (three column layout)
Browse files Browse the repository at this point in the history
- Fixing warnings.
- Adding Swift subclasses of ObjC ones.
  • Loading branch information
Dejal committed Aug 28, 2020
1 parent 35cc288 commit 5fe73d4
Show file tree
Hide file tree
Showing 78 changed files with 592 additions and 384 deletions.
1 change: 1 addition & 0 deletions clients/ios/Classes/ActivityCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "ActivityCell.h"
#import "UIImageView+AFNetworking.h"
#import "NewsBlurAppDelegate.h"
#import "NewsBlur-Swift.h"

@implementation ActivityCell

Expand Down
1 change: 1 addition & 0 deletions clients/ios/Classes/ActivityModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#import <QuartzCore/QuartzCore.h>
#import "ActivityCell.h"
#import "SmallActivityCell.h"
#import "NewsBlur-Swift.h"

@implementation ActivityModule

Expand Down
1 change: 1 addition & 0 deletions clients/ios/Classes/AddSiteTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "ABTableViewCell.h"
#import "UIView+TKCategory.h"
#import "Utilities.h"
#import "NewsBlur-Swift.h"

static UIFont *textFont = nil;
static UIFont *indicatorFont = nil;
Expand Down
1 change: 1 addition & 0 deletions clients/ios/Classes/AddSiteViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <UIKit/UIKit.h>
#import "NewsBlurAppDelegate.h"
#import "NewsBlur-Swift.h"

@class NewsBlurAppDelegate;

Expand Down
22 changes: 11 additions & 11 deletions clients/ios/Classes/AddSiteViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#import "AddSiteViewController.h"
#import "AddSiteAutocompleteCell.h"
#import "NewsBlurAppDelegate.h"
#import "NewsBlurViewController.h"
#import "NBContainerViewController.h"
#import "MenuViewController.h"
#import "SBJson4.h"
#import "NewsBlur-Swift.h"

@interface AddSiteViewController()

Expand Down Expand Up @@ -86,16 +86,16 @@ - (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
return YES;
} else if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) {
return YES;
}
return NO;
}
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// // Return YES for supported orientations
// if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
// return YES;
// } else if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) {
// return YES;
// }
//
// return NO;
//}

- (void)viewDidAppear:(BOOL)animated {
[self.activityIndicator stopAnimating];
Expand Down
13 changes: 3 additions & 10 deletions clients/ios/Classes/AuthorizeServicesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ - (void)viewDidLoad {
self.appDelegate = (NewsBlurAppDelegate *)[[UIApplication sharedApplication] delegate];
}

- (void)viewDidUnload {
[self setWebView:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];

Expand Down Expand Up @@ -72,9 +65,9 @@ - (void)viewWillAppear:(BOOL)animated {
}
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// return YES;
//}

- (void)doCancelButton {
[appDelegate.shareViewController adjustShareButtons];
Expand Down
5 changes: 1 addition & 4 deletions clients/ios/Classes/BaseViewController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "BaseViewController.h"
#import "NewsBlurAppDelegate.h"
#import "NewsBlur-Swift.h"

@implementation BaseViewController

Expand Down Expand Up @@ -127,10 +128,6 @@ - (void) viewDidLoad {
}
}

- (void) viewDidUnload {
[super viewDidUnload];
}

- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];

Expand Down
8 changes: 4 additions & 4 deletions clients/ios/Classes/DashboardViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#import "NewsBlurAppDelegate.h"
#import "ActivityModule.h"
#import "InteractionsModule.h"
#import "FeedDetailViewController.h"
#import "UserProfileViewController.h"
#import "PINCache.h"
#import "StoriesCollection.h"
#import "UISearchBar+Field.h"
#import "NewsBlur-Swift.h"

@implementation DashboardViewController

Expand Down Expand Up @@ -87,9 +87,9 @@ - (void)viewWillAppear:(BOOL)animated {
}
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// return YES;
//}

// allow keyboard comands
- (BOOL)canBecomeFirstResponder {
Expand Down
1 change: 1 addition & 0 deletions clients/ios/Classes/DataUtilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "DataUtilities.h"
#import "NewsBlurAppDelegate.h"
#import "StoriesCollection.h"
#import "NewsBlur-Swift.h"

@implementation DataUtilities

Expand Down
14 changes: 14 additions & 0 deletions clients/ios/Classes/DetailViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// DetailViewController.swift
// NewsBlur
//
// Created by David Sinclair on 2020-08-27.
// Copyright © 2020 NewsBlur. All rights reserved.
//

import UIKit

/// Manages the detail column of the split view, with the feed detail and/or the story pages.
class DetailViewController: BaseViewController {

}
1 change: 1 addition & 0 deletions clients/ios/Classes/FeedChooserItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "FeedChooserItem.h"
#import "NewsBlurAppDelegate.h"
#import "NewsBlur-Swift.h"

@interface FeedChooserItem ()

Expand Down
1 change: 1 addition & 0 deletions clients/ios/Classes/FeedChooserTitleView.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "FeedChooserTitleView.h"
#import "NewsBlurAppDelegate.h"
#import "NewsBlur-Swift.h"

@interface FeedChooserTitleView ()

Expand Down
1 change: 1 addition & 0 deletions clients/ios/Classes/FeedChooserViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import <UIKit/UIKit.h>
#import "NewsBlurAppDelegate.h"
#import "NewsBlur-Swift.h"

typedef NS_ENUM(NSUInteger, FeedChooserOperation)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// FeedDetailViewController.h
// FeedDetailObjCViewController.h
// NewsBlur
//
// Created by Samuel Clay on 6/20/10.
Expand All @@ -17,7 +17,7 @@
@class NewsBlurAppDelegate;
@class MCSwipeTableViewCell;

@interface FeedDetailViewController : BaseViewController
@interface FeedDetailObjCViewController : BaseViewController
<UITableViewDelegate, UITableViewDataSource,
UIPopoverControllerDelegate,
MCSwipeTableViewCellDelegate,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
//
// FeedDetailViewController.m
// FeedDetailObjCViewController.m
// NewsBlur
//
// Created by Samuel Clay on 6/20/10.
// Copyright 2010 NewsBlur. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>
#import "FeedDetailViewController.h"
#import "FeedDetailObjCViewController.h"
#import "NewsBlurAppDelegate.h"
#import "NBContainerViewController.h"
#import "NewsBlurViewController.h"
#import "FeedDetailTableCell.h"
#import "UserProfileViewController.h"
#import "StoryDetailViewController.h"
#import "StoryPageControl.h"
#import "NSString+HTML.h"
#import "MBProgressHUD.h"
#import "SBJson4.h"
Expand All @@ -35,12 +32,13 @@
#import "UISearchBar+Field.h"
#import "MenuViewController.h"
#import "StoryTitleAttributedString.h"
#import "NewsBlur-Swift.h"

#define kTableViewRowHeight 46;
#define kTableViewRiverRowHeight 68;
#define kTableViewShortRowDifference 17;

@interface FeedDetailViewController ()
@interface FeedDetailObjCViewController ()

@property (nonatomic) NSUInteger scrollingMarkReadRow;
@property (nonatomic, readonly) BOOL isMarkReadOnScroll;
Expand All @@ -51,7 +49,7 @@ @interface FeedDetailViewController ()

@end

@implementation FeedDetailViewController
@implementation FeedDetailObjCViewController

@synthesize storyTitlesTable, feedMarkReadButton;
@synthesize settingsBarButton;
Expand Down Expand Up @@ -607,7 +605,7 @@ - (void)finishedLoadingFeedsNotification:(NSNotification *)notification {
folder = [NSString stringWithFormat:@"%@", @(index)];
}

[appDelegate loadRiverFeedDetailView:self withFolder:folder];
[appDelegate loadRiverFeedDetailView:(FeedDetailViewController *)self withFolder:folder];
[self viewWillAppear:NO];
}

Expand Down
2 changes: 1 addition & 1 deletion clients/ios/Classes/FeedDetailTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import "NewsBlurAppDelegate.h"
#import "FeedDetailViewController.h"
#import "FeedDetailTableCell.h"
#import "DashboardViewController.h"
#import "ABTableViewCell.h"
Expand All @@ -16,6 +15,7 @@
#import "Utilities.h"
#import "MCSwipeTableViewCell.h"
#import "PINCache.h"
#import "NewsBlur-Swift.h"

static UIFont *textFont = nil;
static UIFont *indicatorFont = nil;
Expand Down
14 changes: 14 additions & 0 deletions clients/ios/Classes/FeedDetailViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// FeedDetailViewController.swift
// NewsBlur
//
// Created by David Sinclair on 2020-08-27.
// Copyright © 2020 NewsBlur. All rights reserved.
//

import UIKit

/// List of stories for a feed.
class FeedDetailViewController: FeedDetailObjCViewController {

}
3 changes: 2 additions & 1 deletion clients/ios/Classes/FeedTableCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "UnreadCountView.h"
#import "ABTableViewCell.h"
#import "MCSwipeTableViewCell.h"
#import "NewsBlur-Swift.h"

static UIFont *textFont = nil;

Expand Down Expand Up @@ -103,7 +104,7 @@ - (void)setupGestures {
iconName = @"train.png";
}

[self setDelegate:(NewsBlurViewController <MCSwipeTableViewCellDelegate> *)appDelegate.feedsViewController];
[self setDelegate:(FeedsViewController <MCSwipeTableViewCellDelegate> *)appDelegate.feedsViewController];
[self setFirstStateIconName:(iconName)
firstColor:UIColorFromRGB(0xA4D97B)
secondStateIconName:nil
Expand Down
17 changes: 4 additions & 13 deletions clients/ios/Classes/FeedsMenuViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#import "NewsBlurAppDelegate.h"
#import "MBProgressHUD.h"
#import "NBContainerViewController.h"
#import "NewsBlurViewController.h"
#import "MenuTableViewCell.h"
#import "NewsBlur-Swift.h"

@implementation FeedsMenuViewController

Expand Down Expand Up @@ -70,15 +70,6 @@ - (void)rebuildOptions {
[self.menuTableView reloadData];
}

- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
self.menuOptions = nil;
self.menuTableView = nil;
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];

Expand Down Expand Up @@ -118,9 +109,9 @@ - (void)viewWillAppear:(BOOL)animated {
}
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// return YES;
//}

// allow keyboard comands
- (BOOL)canBecomeFirstResponder {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// NewsBlurViewController.h
// FeedsObjCViewController.h
// NewsBlur
//
// Created by Samuel Clay on 6/16/10.
Expand All @@ -25,7 +25,7 @@ static enum {

@class NewsBlurAppDelegate;

@interface NewsBlurViewController : BaseViewController
@interface FeedsObjCViewController : BaseViewController
<UITableViewDelegate, UITableViewDataSource,
NSCacheDelegate,
UIPopoverControllerDelegate,
Expand Down
Loading

0 comments on commit 5fe73d4

Please sign in to comment.