Commit e2f40025 authored by Felix Paul Kühne's avatar Felix Paul Kühne

download view controller: remove singleton

References #198
parent 782f4915
Pipeline #22855 passed with stages
in 17 minutes and 11 seconds
......@@ -32,7 +32,7 @@ protocol RemoteNetworkDataSourceDelegate {
class RemoteNetworkDataSource: NSObject, UITableViewDataSource, UITableViewDelegate {
let cloudVC = VLCCloudServicesTableViewController(nibName: "VLCCloudServicesTableViewController", bundle: Bundle.main)
let streamingVC = VLCOpenNetworkStreamViewController(nibName: "VLCOpenNetworkStreamViewController", bundle: Bundle.main)
let downloadVC = VLCDownloadViewController.sharedInstance()
let downloadVC = VLCDownloadViewController(nibName: "VLCDownloadViewController", bundle: Bundle.main)
@objc weak var delegate: RemoteNetworkDataSourceDelegate?
......@@ -66,9 +66,9 @@ class RemoteNetworkDataSource: NSObject, UITableViewDataSource, UITableViewDeleg
}
case .download:
if let networkCell = tableView.dequeueReusableCell(withIdentifier: VLCRemoteNetworkCell.cellIdentifier) {
networkCell.textLabel?.text = downloadVC?.title
networkCell.detailTextLabel?.text = downloadVC?.detailText
networkCell.imageView?.image = downloadVC?.cellImage
networkCell.textLabel?.text = downloadVC.title
networkCell.detailTextLabel?.text = downloadVC.detailText
networkCell.imageView?.image = downloadVC.cellImage
networkCell.accessibilityIdentifier = VLCAccessibilityIdentifier.downloads
return networkCell
}
......
......@@ -16,8 +16,6 @@
@interface VLCDownloadViewController : UIViewController
+ (instancetype)sharedInstance;
@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UIView *downloadFieldContainer;
@property (nonatomic, strong) IBOutlet UIButton *downloadButton;
......
......@@ -26,18 +26,6 @@
@implementation VLCDownloadViewController
+ (instancetype)sharedInstance
{
static VLCDownloadViewController *sharedInstance = nil;
static dispatch_once_t pred;
dispatch_once(&pred, ^{
sharedInstance = [[VLCDownloadViewController alloc] initWithNibName:@"VLCDownloadViewController" bundle:nil];
});
return sharedInstance;
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment