Fix some Bundle refs

This commit is contained in:
Joe Mattiello
2023-03-02 01:09:10 -05:00
parent e1ed6f5ba3
commit 207f6aac32
10 changed files with 31 additions and 26 deletions

View File

@@ -324,7 +324,7 @@ final class AppViewController: UIViewController {
extension AppViewController {
final class func makeAppViewController(app: StoreApp) -> AppViewController {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let storyboard = UIStoryboard(name: "Main", bundle: Bundle.init(for: AppViewController.self))
let appViewController = storyboard.instantiateViewController(withIdentifier: "appViewController") as! AppViewController
appViewController.app = app

View File

@@ -962,7 +962,7 @@ private extension AppManager {
let patchApp = AnyApp(name: app.name, bundleIdentifier: app.bundleIdentifier, url: patchAppURL)
DispatchQueue.main.async {
let storyboard = UIStoryboard(name: "PatchApp", bundle: nil)
let storyboard = UIStoryboard(name: "PatchApp", bundle: Bundle.init(for: PatchViewController.self))
let navigationController = storyboard.instantiateInitialViewController() as! UINavigationController
let patchViewController = navigationController.topViewController as! PatchViewController

View File

@@ -46,7 +46,7 @@ public final class AuthenticationOperation: ResultOperation<(ALTTeam, ALTCertifi
return navigationController
}()
private lazy var storyboard = UIStoryboard(name: "Authentication", bundle: nil)
private lazy var storyboard = UIStoryboard(name: "Authentication", bundle: Bundle.init(for: AuthenticationViewController.self))
private var appleIDEmailAddress: String?
private var appleIDPassword: String?

View File

@@ -33,7 +33,7 @@ final class PatreonViewController: UICollectionViewController {
override func viewDidLoad() {
super.viewDidLoad()
let aboutHeaderNib = UINib(nibName: "AboutPatreonHeaderView", bundle: nil)
let aboutHeaderNib = UINib(nibName: "AboutPatreonHeaderView", bundle: Bundle(for: PatronsHeaderView.self))
prototypeAboutHeader = aboutHeaderNib.instantiate(withOwner: nil, options: nil)[0] as? AboutPatreonHeaderView
collectionView.dataSource = dataSource

View File

@@ -82,7 +82,7 @@ final class SettingsViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
let nib = UINib(nibName: "SettingsHeaderFooterView", bundle: nil)
let nib = UINib(nibName: "SettingsHeaderFooterView", bundle: Bundle(for: SettingsHeaderFooterView.self))
prototypeHeaderFooterView = nib.instantiate(withOwner: nil, options: nil)[0] as? SettingsHeaderFooterView
tableView.register(nib, forHeaderFooterViewReuseIdentifier: "HeaderFooterView")