Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift 5 migration #12

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
B5360F1C21633CC200E373AB /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Metin Kilicaslan";
TargetAttributes = {
B5360F2321633CC200E373AB = {
Expand Down Expand Up @@ -293,6 +293,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -352,6 +353,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = 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 = "1000"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5360F2321633CC200E373AB"
BuildableName = "MKToolTip-Example-Objc.app"
BlueprintName = "MKToolTip-Example-Objc"
ReferencedContainer = "container:MKToolTip-Example-Objc.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5360F2321633CC200E373AB"
BuildableName = "MKToolTip-Example-Objc.app"
BlueprintName = "MKToolTip-Example-Objc"
ReferencedContainer = "container:MKToolTip-Example-Objc.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:MKToolTip-Example-Objc.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ - (IBAction)barButton1Tapped:(UIBarButtonItem *)sender {
[sender showToolTipWithIdentifier:@""
title:@"Pharetra"
message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus."
button: nil
arrowPosition:ArrowPositionTop
preferences:[[ToolTipPreferences alloc] init]
delegate:nil];
Expand All @@ -42,6 +43,7 @@ - (IBAction)button1Tapped:(UIButton *)sender {
[sender showToolTipWithIdentifier:@""
title:nil
message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus."
button: nil
arrowPosition:ArrowPositionLeft
preferences:preferences
delegate:nil];
Expand All @@ -58,6 +60,7 @@ - (IBAction)button2Tapped:(UIButton *)sender {
[sender showToolTipWithIdentifier:@""
title:@"Dapibus"
message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus."
button: nil
arrowPosition:ArrowPositionRight
preferences:preferences
delegate:nil];
Expand All @@ -75,6 +78,7 @@ - (IBAction)button3Tapped:(UIButton *)sender {
[sender showToolTipWithIdentifier:@""
title:nil
message:@"Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus."
button: nil
arrowPosition:ArrowPositionBottom
preferences:preferences
delegate:nil];
Expand Down
14 changes: 9 additions & 5 deletions MKToolTip-Example/MKToolTip-Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,16 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Metin Kilicaslan";
TargetAttributes = {
B5CCDEF420FB5C7500855E09 = {
CreatedOnToolsVersion = 9.4.1;
LastSwiftMigration = 1200;
};
B5CCDF0820FB5C7600855E09 = {
CreatedOnToolsVersion = 9.4.1;
LastSwiftMigration = 1200;
TestTargetID = B5CCDEF420FB5C7500855E09;
};
};
Expand Down Expand Up @@ -286,6 +288,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -346,6 +349,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -388,7 +392,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -407,7 +411,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -427,7 +431,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example.app/MKToolTip-Example";
};
Expand All @@ -448,7 +452,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "com.metinkilicaslan.MKToolTip-ExampleTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MKToolTip-Example.app/MKToolTip-Example";
};
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 = "1000"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5CCDEF420FB5C7500855E09"
BuildableName = "MKToolTip-Example.app"
BlueprintName = "MKToolTip-Example"
ReferencedContainer = "container:MKToolTip-Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5CCDEF420FB5C7500855E09"
BuildableName = "MKToolTip-Example.app"
BlueprintName = "MKToolTip-Example"
ReferencedContainer = "container:MKToolTip-Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -71,8 +69,6 @@
ReferencedContainer = "container:MKToolTip-Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
4 changes: 2 additions & 2 deletions MKToolTip.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |spec|
spec.name = "MKToolTip"
spec.version = "1.0.6"
spec.version = "1.0.7"
spec.summary = "Simple tooltip view written in Swift."
spec.description = "MKToolTip is a customizable tooltip view written in Swift that can be used as a informative tip."
spec.homepage = "https://github.com/metinkilicaslan/MKToolTip"
spec.license = { type: 'MIT', file: 'LICENSE' }
spec.authors = { "Metin Kilicaslan" => '[email protected]' }

spec.ios.deployment_target = "9.0"
spec.swift_version = "4.2"
spec.swift_version = "5.0"
spec.requires_arc = true
spec.source = { :git => "https://github.com/metinkilicaslan/MKToolTip.git", :tag => "v#{spec.version}"}
spec.source_files = "MKToolTip/MKToolTip/*.{h,swift}"
Expand Down
15 changes: 9 additions & 6 deletions MKToolTip/MKToolTip.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,16 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 0940;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Metin Kilicaslan";
TargetAttributes = {
B5CCDEA020FB45D600855E09 = {
CreatedOnToolsVersion = 9.4.1;
LastSwiftMigration = 0940;
LastSwiftMigration = 1200;
};
B5CCDEA920FB45D600855E09 = {
CreatedOnToolsVersion = 9.4.1;
LastSwiftMigration = 1200;
};
};
};
Expand Down Expand Up @@ -251,6 +252,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -314,6 +316,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -368,7 +371,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -395,7 +398,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTip;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -414,7 +417,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTipTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -433,7 +436,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.metinkilicaslan.MKToolTipTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
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 = "1000"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5CCDEA020FB45D600855E09"
BuildableName = "MKToolTip.framework"
BlueprintName = "MKToolTip"
ReferencedContainer = "container:MKToolTip.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B5CCDEA020FB45D600855E09"
BuildableName = "MKToolTip.framework"
BlueprintName = "MKToolTip"
ReferencedContainer = "container:MKToolTip.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:MKToolTip.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
4 changes: 2 additions & 2 deletions MKToolTip/MKToolTip/MKToolTip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import UIKit

public extension UIView {

@objc public func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) {
@objc func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) {
let tooltip = MKToolTip(view: self, identifier: identifier, title: title, message: message, button: button, arrowPosition: arrowPosition, preferences: preferences, delegate: delegate)
tooltip.calculateFrame()
tooltip.show()
Expand All @@ -42,7 +42,7 @@ public extension UIView {

public extension UIBarItem {

@objc public func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) {
@objc func showToolTip(identifier: String, title: String? = nil, message: String, button: String? = nil, arrowPosition: MKToolTip.ArrowPosition, preferences: ToolTipPreferences = ToolTipPreferences(), delegate: MKToolTipDelegate? = nil) {
if let view = self.view {
view.showToolTip(identifier: identifier, title: title, message: message, button: button, arrowPosition: arrowPosition, preferences: preferences, delegate: delegate)
}
Expand Down