diff --git a/LifetimeTracker.podspec b/LifetimeTracker.podspec index cda19cc..6a91ff0 100644 --- a/LifetimeTracker.podspec +++ b/LifetimeTracker.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LifetimeTracker" - s.version = "1.4.0" + s.version = "1.5.0" s.summary = "Framework to visually warn you when retain cycle / leak happens." s.description = <<-DESC Mini framework that can surface retain cycle issues sooner. @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.resources = "Sources/**/*.{xib,storyboard}" s.resource_bundle = { "LifetimeTracker" => ["Sources/**/*.{strings}"] } s.frameworks = ["Foundation", "UIKit"] - s.swift_version = "4.0" + s.swift_version = "4.2" end diff --git a/LifetimeTracker.xcodeproj/project.pbxproj b/LifetimeTracker.xcodeproj/project.pbxproj index c361b79..df5458d 100644 --- a/LifetimeTracker.xcodeproj/project.pbxproj +++ b/LifetimeTracker.xcodeproj/project.pbxproj @@ -448,11 +448,11 @@ TargetAttributes = { 52D6D97B1BEFF229002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1000; }; 52D6D9851BEFF229002C0205 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 1000; }; 52D6D9E11BEFFF6E002C0205 = { CreatedOnToolsVersion = 7.1; @@ -784,6 +784,7 @@ PRODUCT_NAME = LifetimeTracker; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -805,6 +806,7 @@ PRODUCT_NAME = LifetimeTracker; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -817,6 +819,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.LifetimeTracker.LifetimeTracker-iOS-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -829,6 +832,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.LifetimeTracker.LifetimeTracker-iOS-Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Sources/UI/CircularDashboard/CircularDashboardViewController.swift b/Sources/UI/CircularDashboard/CircularDashboardViewController.swift index bd6fd73..d0361e6 100644 --- a/Sources/UI/CircularDashboard/CircularDashboardViewController.swift +++ b/Sources/UI/CircularDashboard/CircularDashboardViewController.swift @@ -144,14 +144,14 @@ class CircularDashboardViewController: UIViewController, LifetimeTrackerViewable private lazy var popoverWindow: UIWindow = { let popoverWindow = UIWindow(frame: .zero) - popoverWindow.windowLevel = UIWindowLevelNormal + popoverWindow.windowLevel = UIWindow.Level.normal popoverWindow.frame = UIScreen.main.bounds let navigationController = UIStoryboard(name: Constants.Storyboard.circularDashboard.name, bundle: Bundle(for: CircularDashboardViewController.self)).instantiateInitialViewController() popoverWindow.rootViewController = navigationController popoverWindow.rootViewController?.view.backgroundColor = UIColor.yellow - self.lifetimeTrackerListViewController = navigationController?.childViewControllers.first as? LifetimeTrackerListViewController + self.lifetimeTrackerListViewController = navigationController?.children.first as? LifetimeTrackerListViewController self.lifetimeTrackerListViewController?.delegate = self self.lifetimeTrackerListViewController?.update(dashboardViewModel: self.dashboardViewModel) diff --git a/Sources/UI/LifetimeTracker+DashboardView.swift b/Sources/UI/LifetimeTracker+DashboardView.swift index 44279a1..da6f457 100644 --- a/Sources/UI/LifetimeTracker+DashboardView.swift +++ b/Sources/UI/LifetimeTracker+DashboardView.swift @@ -9,8 +9,8 @@ import UIKit fileprivate extension String { #if swift(>=4.0) - typealias AttributedStringKey = NSAttributedStringKey - static let foregroundColorAttributeName = NSAttributedStringKey.foregroundColor + typealias AttributedStringKey = NSAttributedString.Key + static let foregroundColorAttributeName = NSAttributedString.Key.foregroundColor #else typealias AttributedStringKey = String static let foregroundColorAttributeName = NSForegroundColorAttributeName @@ -66,7 +66,7 @@ typealias GroupModel = (color: UIColor, title: String, entries: [EntryModel]) private lazy var window: UIWindow = { let window = UIWindow(frame: .zero) - window.windowLevel = UIWindowLevelStatusBar + window.windowLevel = UIWindow.Level.statusBar window.frame = UIScreen.main.bounds window.rootViewController = self.lifetimeTrackerView return window