Skip to content

Commit

Permalink
initial Swift 5 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JARinteractive committed Mar 26, 2019
1 parent 23272fe commit 38739c2
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 23 deletions.
13 changes: 8 additions & 5 deletions ReLax/ReLax.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,23 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Asynchrony;
TargetAttributes = {
4D72CD6B1E690A99005D8769 = {
CreatedOnToolsVersion = 8.2;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 4D72CD661E690A99005D8769 /* Build configuration list for PBXProject "ReLax" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 4D72CD621E690A99005D8769;
productRefGroup = 4D72CD6D1E690A99005D8769 /* Products */;
Expand Down Expand Up @@ -244,6 +245,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -306,6 +308,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -376,7 +379,7 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand All @@ -400,7 +403,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion ReLax/ReLax/Convenience.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ open class DefaultContainer: UIView, ParallaxContainer {
}

open class ParallaxButton<Container: UIView>: UIButton where Container: ParallaxContainer {
open let parallaxView: ParallaxView<Container>
public let parallaxView: ParallaxView<Container>

open override var isHighlighted: Bool {
didSet {
Expand Down
2 changes: 1 addition & 1 deletion ReLax/ReLax/ParallaxView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ open class AnimatedShadowView: UIView {
let keys = ["shadowRadius", "shadowOpacity", "shadowOffset"]
if keys.contains(event) {
let animation = CABasicAnimation(keyPath: event)
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
return animation
}

Expand Down
2 changes: 1 addition & 1 deletion ReLaxExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
let tabs = UITabBarController()
tabs.setViewControllers([JaggedEdgeViewController(), StaticTextViewController(), ReLaxViewController()], animated: false)
window = UIWindow()
Expand Down
14 changes: 7 additions & 7 deletions ReLaxExample/ReLaxExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,19 @@
4D1CC1BB1E6DB9530056E465 = {
CreatedOnToolsVersion = 8.1;
DevelopmentTeam = 438VZ6GLSU;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
5AA998AC1CA98CBA00A66418 = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0900;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 5A02893F1C972EBE004B9E03 /* Build configuration list for PBXProject "ReLaxExample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -366,7 +366,7 @@
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
Expand All @@ -385,7 +385,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 10.0;
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -511,7 +511,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = appletvos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
};
Expand All @@ -533,7 +533,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = appletvos;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1020"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down
9 changes: 4 additions & 5 deletions ReLaxExample/ReLaxTopShelfExample/ServiceProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,13 @@ class ServiceProvider: NSObject, TVTopShelfProvider {
return (lcrFileURL, title)
}

guard let contentIdentifier = TVContentIdentifier(identifier: UUID().uuidString, container: nil) else { fatalError("Error creating content identifier.") }
guard let contentItem = TVContentItem(contentIdentifier: contentIdentifier) else { fatalError("Error creating content item.") }
let contentIdentifier = TVContentIdentifier(identifier: UUID().uuidString, container: nil)
let contentItem = TVContentItem(contentIdentifier: contentIdentifier)
contentItem.title = "Pixar"

contentItem.topShelfItems = imagesWithIdentifiers.map { url, identifier in
guard let contentIdentifier = TVContentIdentifier(identifier: identifier, container: nil) else { fatalError("Error creating content identifier.") }
guard let contentItem = TVContentItem(contentIdentifier: contentIdentifier) else { fatalError("Error creating content item.") }

let contentIdentifier = TVContentIdentifier(identifier: identifier, container: nil)
let contentItem = TVContentItem(contentIdentifier: contentIdentifier)
contentItem.title = identifier
contentItem.displayURL = nil
contentItem.imageURL = url
Expand Down

0 comments on commit 38739c2

Please sign in to comment.