Skip to content

Commit eac2db9

Browse files
committed
Bump to Swift 5.0
1 parent 4958a18 commit eac2db9

File tree

13 files changed

+44
-31
lines changed

13 files changed

+44
-31
lines changed

CFNotify.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "CFNotify"
3-
s.version = "1.0.1"
3+
s.version = "1.0.2"
44
s.summary = "A customizable framework to create draggable views"
55
s.homepage = "https://github.com/hallelujahbaby/CFNotify"
66
s.license = { :type => "MIT", :file => "LICENSE" }

CFNotify.xcodeproj/project.pbxproj

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,13 +408,13 @@
408408
isa = PBXProject;
409409
attributes = {
410410
LastSwiftUpdateCheck = 0810;
411-
LastUpgradeCheck = 0900;
411+
LastUpgradeCheck = 1020;
412412
ORGANIZATIONNAME = "Johnny Choi@Co-Fire";
413413
TargetAttributes = {
414414
05C8271C1DD31B7A003E0C5E = {
415415
CreatedOnToolsVersion = 8.1;
416416
DevelopmentTeam = 6J24DF2E7Y;
417-
LastSwiftMigration = 0900;
417+
LastSwiftMigration = 1020;
418418
ProvisioningStyle = Automatic;
419419
};
420420
05C827251DD31B7A003E0C5E = {
@@ -430,10 +430,11 @@
430430
};
431431
buildConfigurationList = 05C827171DD31B7A003E0C5E /* Build configuration list for PBXProject "CFNotify" */;
432432
compatibilityVersion = "Xcode 3.2";
433-
developmentRegion = English;
433+
developmentRegion = en;
434434
hasScannedForEncodings = 0;
435435
knownRegions = (
436436
en,
437+
Base,
437438
);
438439
mainGroup = 05C827131DD31B7A003E0C5E;
439440
productRefGroup = 05C8271E1DD31B7A003E0C5E /* Products */;
@@ -565,6 +566,7 @@
565566
isa = XCBuildConfiguration;
566567
buildSettings = {
567568
ALWAYS_SEARCH_USER_PATHS = NO;
569+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
568570
CLANG_ANALYZER_NONNULL = YES;
569571
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
570572
CLANG_CXX_LIBRARY = "libc++";
@@ -574,13 +576,15 @@
574576
CLANG_WARN_BOOL_CONVERSION = YES;
575577
CLANG_WARN_COMMA = YES;
576578
CLANG_WARN_CONSTANT_CONVERSION = YES;
579+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
577580
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
578581
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
579582
CLANG_WARN_EMPTY_BODY = YES;
580583
CLANG_WARN_ENUM_CONVERSION = YES;
581584
CLANG_WARN_INFINITE_RECURSION = YES;
582585
CLANG_WARN_INT_CONVERSION = YES;
583586
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
587+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
584588
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
585589
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
586590
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -627,6 +631,7 @@
627631
isa = XCBuildConfiguration;
628632
buildSettings = {
629633
ALWAYS_SEARCH_USER_PATHS = NO;
634+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
630635
CLANG_ANALYZER_NONNULL = YES;
631636
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
632637
CLANG_CXX_LIBRARY = "libc++";
@@ -636,13 +641,15 @@
636641
CLANG_WARN_BOOL_CONVERSION = YES;
637642
CLANG_WARN_COMMA = YES;
638643
CLANG_WARN_CONSTANT_CONVERSION = YES;
644+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
639645
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
640646
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
641647
CLANG_WARN_EMPTY_BODY = YES;
642648
CLANG_WARN_ENUM_CONVERSION = YES;
643649
CLANG_WARN_INFINITE_RECURSION = YES;
644650
CLANG_WARN_INT_CONVERSION = YES;
645651
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
652+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
646653
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
647654
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
648655
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -697,8 +704,7 @@
697704
PRODUCT_NAME = "$(TARGET_NAME)";
698705
SKIP_INSTALL = NO;
699706
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
700-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
701-
SWIFT_VERSION = 4.0;
707+
SWIFT_VERSION = 5.0;
702708
TARGETED_DEVICE_FAMILY = "1,2";
703709
};
704710
name = Debug;
@@ -721,8 +727,7 @@
721727
PRODUCT_BUNDLE_IDENTIFIER = "hk.co-fire.CFNotify";
722728
PRODUCT_NAME = "$(TARGET_NAME)";
723729
SKIP_INSTALL = NO;
724-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
725-
SWIFT_VERSION = 4.0;
730+
SWIFT_VERSION = 5.0;
726731
TARGETED_DEVICE_FAMILY = "1,2";
727732
};
728733
name = Release;

CFNotify.xcodeproj/xcshareddata/xcschemes/CFNotify.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
<TestableReference
@@ -56,7 +55,6 @@
5655
buildConfiguration = "Debug"
5756
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5857
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
59-
language = ""
6058
launchStyle = "0"
6159
useCustomWorkingDirectory = "NO"
6260
ignoresPersistentStateOnLaunch = "NO"

CFNotify.xcodeproj/xcshareddata/xcschemes/CFResources.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -37,7 +36,6 @@
3736
buildConfiguration = "Debug"
3837
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
3938
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
40-
language = ""
4139
launchStyle = "0"
4240
useCustomWorkingDirectory = "NO"
4341
ignoresPersistentStateOnLaunch = "NO"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

CFNotify/CFNoticeView/ClassicView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ open class ClassicView: UIView {
190190
/**
191191
Set image view's content mode
192192
*/
193-
open var imageViewContentMode: UIViewContentMode = .scaleAspectFill {
193+
open var imageViewContentMode: UIView.ContentMode = .scaleAspectFill {
194194
didSet {
195195
imageView.contentMode = imageViewContentMode
196196
}

CFNotify/CFNoticeView/CyberView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ open class CyberView: UIView {
190190
/**
191191
Set image view's content mode
192192
*/
193-
open var imageViewContentMode: UIViewContentMode = .scaleAspectFill {
193+
open var imageViewContentMode: UIView.ContentMode = .scaleAspectFill {
194194
didSet {
195195
imageView.contentMode = imageViewContentMode
196196
}
@@ -212,7 +212,7 @@ open class CyberView: UIView {
212212
var vibrancyEffectView: UIVisualEffectView
213213

214214
// MARK: - Initialization
215-
public init(title: String? = nil, body: String? = nil, image: UIImage? = nil, blurStyle: UIBlurEffectStyle) {
215+
public init(title: String? = nil, body: String? = nil, image: UIImage? = nil, blurStyle: UIBlurEffect.Style) {
216216
blurEffect = UIBlurEffect(style: blurStyle)
217217
blurEffectView = UIVisualEffectView(effect: blurEffect)
218218
vibrancyEffect = UIVibrancyEffect(blurEffect: blurEffect)

CFNotify/CFNotifyView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ extension CFNotifyView {
8484
return view
8585
}
8686

87-
public static func cyberWith(title: String? = nil, titleFont: UIFont, titleColor: UIColor, body: String? = nil, bodyFont: UIFont, bodyColor: UIColor, image: UIImage? = nil, backgroundColor: UIColor, blurStyle: UIBlurEffectStyle) -> CyberView {
87+
public static func cyberWith(title: String? = nil, titleFont: UIFont, titleColor: UIColor, body: String? = nil, bodyFont: UIFont, bodyColor: UIColor, image: UIImage? = nil, backgroundColor: UIColor, blurStyle: UIBlurEffect.Style) -> CyberView {
8888

8989
let view = CyberView(title: title, body: body, image: image, blurStyle: blurStyle)
9090
view.titleTextFont = titleFont

CFNotify/Notifier.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class Notifier: NSObject, UIGestureRecognizerDelegate {
102102
self.containerView.bounds = self.view.bounds
103103
self.containerView.backgroundColor = UIColor.clear
104104
self.containerView.addSubview(self.view)
105-
self.containerView.bringSubview(toFront: self.view)
105+
self.containerView.bringSubviewToFront(self.view)
106106
self.containerView.addGestureRecognizer(self.panRecognizer)
107107
if self.tapAction == nil {
108108
self.containerView.addGestureRecognizer(self.tapRecognizer)
@@ -272,7 +272,7 @@ class Notifier: NSObject, UIGestureRecognizerDelegate {
272272
}
273273

274274
//Add Push Behaviour
275-
let pushBehavior = UIPushBehavior(items: [gestureView], mode: UIPushBehaviorMode.instantaneous)
275+
let pushBehavior = UIPushBehavior(items: [gestureView], mode: UIPushBehavior.Mode.instantaneous)
276276
pushBehavior.pushDirection = vector
277277

278278
let pushMagnitude : CGFloat = pushBehavior.magnitude * self.config.pushForceFactor

Example/CFNotifyExample/CFNotifyExample.xcodeproj/project.pbxproj

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,20 @@
179179
isa = PBXProject;
180180
attributes = {
181181
LastSwiftUpdateCheck = 0810;
182-
LastUpgradeCheck = 0900;
182+
LastUpgradeCheck = 1020;
183183
ORGANIZATIONNAME = "Johnny@Co-fire";
184184
TargetAttributes = {
185185
B231B36F1DD35A1400D29BD5 = {
186186
CreatedOnToolsVersion = 8.1;
187187
DevelopmentTeam = 6J24DF2E7Y;
188-
LastSwiftMigration = 0900;
188+
LastSwiftMigration = 1020;
189189
ProvisioningStyle = Automatic;
190190
};
191191
};
192192
};
193193
buildConfigurationList = B231B36B1DD35A1400D29BD5 /* Build configuration list for PBXProject "CFNotifyExample" */;
194194
compatibilityVersion = "Xcode 3.2";
195-
developmentRegion = English;
195+
developmentRegion = en;
196196
hasScannedForEncodings = 0;
197197
knownRegions = (
198198
en,
@@ -271,6 +271,7 @@
271271
isa = XCBuildConfiguration;
272272
buildSettings = {
273273
ALWAYS_SEARCH_USER_PATHS = NO;
274+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
274275
CLANG_ANALYZER_NONNULL = YES;
275276
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
276277
CLANG_CXX_LIBRARY = "libc++";
@@ -280,13 +281,15 @@
280281
CLANG_WARN_BOOL_CONVERSION = YES;
281282
CLANG_WARN_COMMA = YES;
282283
CLANG_WARN_CONSTANT_CONVERSION = YES;
284+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
283285
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
284286
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
285287
CLANG_WARN_EMPTY_BODY = YES;
286288
CLANG_WARN_ENUM_CONVERSION = YES;
287289
CLANG_WARN_INFINITE_RECURSION = YES;
288290
CLANG_WARN_INT_CONVERSION = YES;
289291
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
292+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
290293
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
291294
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
292295
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -327,6 +330,7 @@
327330
isa = XCBuildConfiguration;
328331
buildSettings = {
329332
ALWAYS_SEARCH_USER_PATHS = NO;
333+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
330334
CLANG_ANALYZER_NONNULL = YES;
331335
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
332336
CLANG_CXX_LIBRARY = "libc++";
@@ -336,13 +340,15 @@
336340
CLANG_WARN_BOOL_CONVERSION = YES;
337341
CLANG_WARN_COMMA = YES;
338342
CLANG_WARN_CONSTANT_CONVERSION = YES;
343+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
339344
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
340345
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
341346
CLANG_WARN_EMPTY_BODY = YES;
342347
CLANG_WARN_ENUM_CONVERSION = YES;
343348
CLANG_WARN_INFINITE_RECURSION = YES;
344349
CLANG_WARN_INT_CONVERSION = YES;
345350
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
351+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
346352
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
347353
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
348354
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -383,8 +389,7 @@
383389
PRODUCT_BUNDLE_IDENTIFIER = "hk.co-fire.CFNotifyExample";
384390
PRODUCT_NAME = "$(TARGET_NAME)";
385391
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
386-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
387-
SWIFT_VERSION = 4.0;
392+
SWIFT_VERSION = 5.0;
388393
};
389394
name = Debug;
390395
};
@@ -398,8 +403,7 @@
398403
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
399404
PRODUCT_BUNDLE_IDENTIFIER = "hk.co-fire.CFNotifyExample";
400405
PRODUCT_NAME = "$(TARGET_NAME)";
401-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
402-
SWIFT_VERSION = 4.0;
406+
SWIFT_VERSION = 5.0;
403407
};
404408
name = Release;
405409
};

Example/CFNotifyExample/CFNotifyExample.xcodeproj/xcshareddata/xcschemes/CFNotifyExample.xcscheme

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,7 +26,6 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
</Testables>
@@ -46,7 +45,6 @@
4645
buildConfiguration = "Debug"
4746
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4847
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49-
language = ""
5048
launchStyle = "0"
5149
useCustomWorkingDirectory = "NO"
5250
ignoresPersistentStateOnLaunch = "NO"

Example/CFNotifyExample/CFNotifyExample/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919
Thread.sleep(forTimeInterval: 2)
2020
return true

Example/CFNotifyExample/CFNotifyExample/ClassicVC.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ class ClassicVC: UIViewController {
5858
classicViewConfig.initPosition = .top(.random)
5959
classicViewConfig.appearPosition = .top
6060
classicViewConfig.hideTime = .never
61+
classicViewConfig.snapDamping = 1.0
62+
6163

6264
CFNotify.present(config: classicViewConfig, view: classicView)
6365
CFNotify.present(config: classicViewConfig, view: classicView2)

0 commit comments

Comments
 (0)