Browse Source

MediaViewController: MediaDataSource: Mark init() as unavailable

Soomin Lee 7 years ago
parent
commit
ea550c1b1a
2 changed files with 10 additions and 0 deletions
  1. 5 0
      SharedSources/MediaDataSource.swift
  2. 5 0
      Sources/MediaViewController.swift

+ 5 - 0
SharedSources/MediaDataSource.swift

@@ -17,6 +17,11 @@ public class MediaDataSourceAndDelegate: NSObject, UICollectionViewDataSource, U
     private var services: Services
     public weak var delegate: UICollectionViewDelegate?
 
+    @available(*, unavailable)
+    override init() {
+        fatalError()
+    }
+
     init(services: Services) {
         self.services = services
         super.init()

+ 5 - 0
Sources/MediaViewController.swift

@@ -40,6 +40,11 @@ public class VLCMediaViewController: UICollectionViewController, UISearchResults
         return emptyView
     }()
 
+    @available(*, unavailable)
+    init() {
+        fatalError()
+    }
+
     init(services: Services) {
         self.services = services
         super.init(collectionViewLayout: UICollectionViewFlowLayout())