From 22793420ee38e956712d85e0f1fae1d59d0b4a3f Mon Sep 17 00:00:00 2001 From: Vincent Tourraine Date: Tue, 21 Sep 2021 22:32:04 +0200 Subject: [PATCH] Refactor default initializer, fix Xcode 13 support #89 --- Sources/AcknowList/AcknowListViewController.swift | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Sources/AcknowList/AcknowListViewController.swift b/Sources/AcknowList/AcknowListViewController.swift index 44292a9..998d50b 100644 --- a/Sources/AcknowList/AcknowListViewController.swift +++ b/Sources/AcknowList/AcknowListViewController.swift @@ -57,13 +57,16 @@ open class AcknowListViewController: UITableViewController { - returns: The new `AcknowListViewController` instance. */ - public convenience init() { + public init() { + self.acknowledgements = [] + + super.init(style: .grouped) + if let path = AcknowListViewController.defaultAcknowledgementsPlistPath() { - self.init(plistPath: path) - } - else { - self.init(acknowledgements: []) + load(from: path) } + + self.title = AcknowLocalization.localizedTitle() } /**