Skip to content

Commit

Permalink
Fixing Swift 3 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisballinger committed Feb 16, 2017
1 parent 82326ec commit 0d90e42
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ParkedTextField.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ParkedTextField"
s.version = "0.2.1"
s.version = "0.3.0"
s.summary = "A UITextField subclass with an appended constant text"
s.homepage = "https://github.com/gmertk/ParkedTextField"
s.screenshots = "https://dl.dropboxusercontent.com/u/4397140/pod-screenshots/ParkedTextField.gif"
Expand Down
25 changes: 23 additions & 2 deletions ParkedTextField/ParkedTextField.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
A5EACD401B6247CA006E8A67 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = A5EACD3E1B6247CA006E8A67 /* LaunchScreen.xib */; };
A5EACD4C1B6247CA006E8A67 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EACD4B1B6247CA006E8A67 /* ExampleTests.swift */; };
A5EACD561B62491C006E8A67 /* ParkedTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EACD551B62491C006E8A67 /* ParkedTextField.swift */; };
D9BD54111E566335007077FB /* ParkedTextField.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5EACD0F1B624754006E8A67 /* ParkedTextField.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -25,6 +26,13 @@
remoteGlobalIDString = A5EACD301B6247CA006E8A67;
remoteInfo = Example;
};
D9BD54121E56633B007077FB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A5EACD061B624754006E8A67 /* Project object */;
proxyType = 1;
remoteGlobalIDString = A5EACD0E1B624754006E8A67;
remoteInfo = ParkedTextField;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -56,6 +64,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D9BD54111E566335007077FB /* ParkedTextField.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -188,6 +197,7 @@
buildRules = (
);
dependencies = (
D9BD54131E56633B007077FB /* PBXTargetDependency */,
);
name = Example;
productName = Example;
Expand Down Expand Up @@ -219,7 +229,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = "Gunay Mert Karadogan";
TargetAttributes = {
A5EACD0E1B624754006E8A67 = {
Expand Down Expand Up @@ -316,6 +326,11 @@
target = A5EACD301B6247CA006E8A67 /* Example */;
targetProxy = A5EACD461B6247CA006E8A67 /* PBXContainerItemProxy */;
};
D9BD54131E56633B007077FB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = A5EACD0E1B624754006E8A67 /* ParkedTextField */;
targetProxy = D9BD54121E56633B007077FB /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down Expand Up @@ -351,8 +366,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -400,8 +417,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -421,6 +440,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -431,7 +451,7 @@
A5EACD261B624754006E8A67 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
Expand All @@ -450,6 +470,7 @@
A5EACD271B624754006E8A67 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
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 = "0720"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions ParkedTextField/ParkedTextField/ParkedTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ open class ParkedTextField: UITextField {
let utf16view = text.utf16
let from = String.UTF16View.Index(range.lowerBound, within: utf16view)
let to = String.UTF16View.Index(range.upperBound, within: utf16view)
let loc = utf16view.startIndex.distanceTo(from)
let len = from.distanceTo(to)
let loc = utf16view.startIndex.distance(to: from)
let len = from.distance(to: to)
return NSMakeRange(loc, len)
}

Expand Down

0 comments on commit 0d90e42

Please sign in to comment.