Skip to content

Commit

Permalink
Merge pull request #49 from bluesource/master
Browse files Browse the repository at this point in the history
Updated to Swift 4.2
  • Loading branch information
krzysztofzablocki committed Sep 29, 2018
2 parents cda50c6 + e40725a commit 8f4febf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions LifetimeTracker.podspec
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
8 changes: 6 additions & 2 deletions LifetimeTracker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -784,6 +784,7 @@
PRODUCT_NAME = LifetimeTracker;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -805,6 +806,7 @@
PRODUCT_NAME = LifetimeTracker;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand All @@ -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;
};
Expand All @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions Sources/UI/LifetimeTracker+DashboardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8f4febf

Please sign in to comment.