Permalink
Browse files

update to Swift 4.2

  • Loading branch information...
thompsonate committed Aug 4, 2018
1 parent b483bb8 commit c0513edf1877f808cdf26ea7efbd6e308adce5f8
@@ -369,7 +369,7 @@
43C7A4841F19F2CB00A697C0 = {
CreatedOnToolsVersion = 8.3.2;
DevelopmentTeam = 3Q7XKEDZ36;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
@@ -380,7 +380,7 @@
43CC9E421EBAB19300983528 = {
CreatedOnToolsVersion = 8.3.1;
DevelopmentTeam = 3Q7XKEDZ36;
LastSwiftMigration = 0900;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Sandbox = {
@@ -606,7 +606,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -628,7 +628,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
@@ -765,7 +765,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Shifty/Shifty-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
@@ -791,7 +791,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Shifty/Shifty-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
@@ -14,7 +14,7 @@ class AccessibilityView: NSView {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
guard let nib = NSNib(nibNamed: .init("AccessibilityView"), bundle: Bundle(for: type(of: self))) else { return }
guard let nib = NSNib(nibNamed: "AccessibilityView", bundle: Bundle(for: type(of: self))) else { return }
nib.instantiate(withOwner: self, topLevelObjects: nil)
var newConstraints: [NSLayoutConstraint] = []
@@ -13,7 +13,7 @@ class AccessibilityWindow: NSWindowController {
@IBOutlet weak var openSysPrefsButton: NSButton!
override var windowNibName: NSNib.Name {
get { return NSNib.Name("AccessibilityWindow") }
get { return "AccessibilityWindow" }
}
override func windowDidLoad() {
@@ -136,7 +136,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
func showSetupWindow() {
let storyboard = NSStoryboard(name: .init("Setup"), bundle: nil)
let storyboard = NSStoryboard(name: "Setup", bundle: nil)
let controller = storyboard.instantiateInitialController() as! NSWindowController
setupWindow = controller.window
@@ -27,7 +27,7 @@ class CustomTimeWindow: NSWindowController {
let onlyIntValueFormatter = OnlyIntValueFormatter()
override var windowNibName: NSNib.Name {
return NSNib.Name("CustomTimeWindow")
return "CustomTimeWindow"
}
override func windowDidLoad() {
@@ -37,7 +37,7 @@ class CustomTimeWindow: NSWindowController {
window?.center()
}
let saveName = NSWindow.FrameAutosaveName.init("customTimeWindowFrame")
let saveName = "customTimeWindowFrame"
window?.setFrameUsingName(saveName)
@@ -15,7 +15,7 @@ let ShiftyUpdater = SUUpdater()
class PrefAboutViewController: NSViewController, MASPreferencesViewController {
override var nibName: NSNib.Name {
get { return NSNib.Name("PrefAboutViewController") }
get { return "PrefAboutViewController" }
}
var viewIdentifier: String = "PrefAboutViewController"
@@ -16,13 +16,13 @@ import SwiftLog
class PrefGeneralViewController: NSViewController, MASPreferencesViewController {
override var nibName: NSNib.Name {
return NSNib.Name("PrefGeneralViewController")
return "PrefGeneralViewController"
}
var viewIdentifier: String = "PrefGeneralViewController"
var toolbarItemImage: NSImage? {
return NSImage(named: .preferencesGeneral)
return NSImage(named: NSImage.preferencesGeneralName)
}
var toolbarItemLabel: String? {
@@ -15,7 +15,7 @@ class PrefShortcutsViewController: NSViewController, MASPreferencesViewControlle
let statusMenuController = (NSApplication.shared.delegate as? AppDelegate)?.statusMenu.delegate as? StatusMenuController
override var nibName: NSNib.Name {
return NSNib.Name("PrefShortcutsViewController")
return "PrefShortcutsViewController"
}
var viewIdentifier: String = "PrefShortcutsViewController"
@@ -11,7 +11,7 @@ import SwiftLog
class SetupWindowController: NSWindowController {
override var storyboard: NSStoryboard {
return NSStoryboard(name: .init("Setup"), bundle: nil)
return NSStoryboard(name: "Setup", bundle: nil)
}
override func windowDidLoad() {
@@ -77,7 +77,7 @@ class AccessibilityViewController: NSViewController {
}
func showNextView() {
performSegue(withIdentifier: NSStoryboardSegue.Identifier("showCompleteView"), sender: self)
performSegue(withIdentifier: "showCompleteView", sender: self)
}
}
@@ -87,9 +87,9 @@ class ContainerViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
let setupStoryboard = NSStoryboard(name: .init("Setup"), bundle: nil)
sourceViewController = setupStoryboard.instantiateController(withIdentifier: .init("sourceViewController")) as! NSViewController
self.insertChildViewController(sourceViewController, at: 0)
let setupStoryboard = NSStoryboard(name: "Setup", bundle: nil)
sourceViewController = setupStoryboard.instantiateController(withIdentifier: "sourceViewController") as! NSViewController
self.insertChild(sourceViewController, at: 0)
self.view.addSubview(sourceViewController.view)
self.view.frame = sourceViewController.view.frame
@@ -37,7 +37,7 @@ class SlideSegue: NSStoryboardSegue {
let destinationViewController = self.destinationController as! NSViewController
let containerViewController = sourceViewController.parent
containerViewController?.insertChildViewController(destinationViewController, at: 1)
containerViewController?.insertChild(destinationViewController, at: 1)
let targetSize = destinationViewController.view.frame.size
@@ -54,6 +54,6 @@ class SlideSegue: NSStoryboardSegue {
containerViewController?.view.topAnchor.constraint(equalTo: destinationViewController.view.topAnchor).isActive = true
})
containerViewController?.removeChildViewController(at: 0)
containerViewController?.removeChild(at: 0)
}
}

0 comments on commit c0513ed

Please sign in to comment.