diff --git a/AlertOnboarding.xcodeproj/project.pbxproj b/AlertOnboarding.xcodeproj/project.pbxproj
index 4fb1e79..fca9c5b 100644
--- a/AlertOnboarding.xcodeproj/project.pbxproj
+++ b/AlertOnboarding.xcodeproj/project.pbxproj
@@ -111,11 +111,13 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
- LastUpgradeCheck = 0800;
+ LastUpgradeCheck = 1100;
ORGANIZATIONNAME = CookMinute;
TargetAttributes = {
37845A641D994CBA009B3734 = {
CreatedOnToolsVersion = 8.0;
+ DevelopmentTeam = N7MCZ8UJRF;
+ LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
};
@@ -125,6 +127,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
Base,
);
@@ -191,20 +194,30 @@
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++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -242,20 +255,30 @@
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++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -286,12 +309,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ DEVELOPMENT_TEAM = N7MCZ8UJRF;
INFOPLIST_FILE = AlertOnboarding/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.cookminute.AlertOnboarding;
+ PRODUCT_BUNDLE_IDENTIFIER = com.Tsarshah.AlertOnboarding;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -299,12 +323,13 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ DEVELOPMENT_TEAM = N7MCZ8UJRF;
INFOPLIST_FILE = AlertOnboarding/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.cookminute.AlertOnboarding;
+ PRODUCT_BUNDLE_IDENTIFIER = com.Tsarshah.AlertOnboarding;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.0;
+ SWIFT_VERSION = 5.0;
};
name = Release;
};
diff --git a/AlertOnboarding/AlertOnboarding.swift b/AlertOnboarding/AlertOnboarding.swift
index 060b91e..51a92aa 100644
--- a/AlertOnboarding/AlertOnboarding.swift
+++ b/AlertOnboarding/AlertOnboarding.swift
@@ -82,8 +82,8 @@ open class AlertOnboarding: UIView, AlertPageViewDelegate {
//Update Color
self.buttonBottom.backgroundColor = colorButtonBottomBackground
self.backgroundColor = colorForAlertViewBackground
- self.buttonBottom.setTitleColor(colorButtonText, for: UIControlState())
- self.buttonBottom.setTitle(self.titleSkipButton, for: UIControlState())
+ self.buttonBottom.setTitleColor(colorButtonText, for: UIControl.State())
+ self.buttonBottom.setTitle(self.titleSkipButton, for: UIControl.State())
self.container = AlertPageViewController(arrayOfImage: arrayOfImage, arrayOfTitle: arrayOfTitle, arrayOfDescription: arrayOfDescription, alertView: self)
self.container.delegate = self
@@ -200,7 +200,7 @@ open class AlertOnboarding: UIView, AlertPageViewDelegate {
}
fileprivate func animateForEnding(){
- UIView.animate(withDuration: 0.2, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: {
+ UIView.animate(withDuration: 0.2, delay: 0.0, options: UIView.AnimationOptions.curveEaseOut, animations: {
self.alpha = 0.0
}, completion: {
(finished: Bool) -> Void in
@@ -209,7 +209,7 @@ open class AlertOnboarding: UIView, AlertPageViewDelegate {
() -> Void in
self.background.removeFromSuperview()
self.removeFromSuperview()
- self.container.removeFromParentViewController()
+ self.container.removeFromParent()
self.container.view.removeFromSuperview()
}
})
@@ -239,7 +239,7 @@ open class AlertOnboarding: UIView, AlertPageViewDelegate {
//MARK: NOTIFICATIONS PROCESS ------------------------------------------
fileprivate func interceptOrientationChange(){
UIDevice.current.beginGeneratingDeviceOrientationNotifications()
- NotificationCenter.default.addObserver(self, selector: #selector(AlertOnboarding.onOrientationChange), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
+ NotificationCenter.default.addObserver(self, selector: #selector(AlertOnboarding.onOrientationChange), name: UIDevice.orientationDidChangeNotification, object: nil)
}
@objc func onOrientationChange(){
diff --git a/AlertOnboarding/AlertPageViewController.swift b/AlertOnboarding/AlertPageViewController.swift
index 06611a0..e4d2d5c 100644
--- a/AlertOnboarding/AlertPageViewController.swift
+++ b/AlertOnboarding/AlertPageViewController.swift
@@ -53,7 +53,7 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
self.view.backgroundColor = UIColor.clear
self.view.addSubview(self.pageController.view)
self.view.addSubview(self.pageControl)
- self.pageController.didMove(toParentViewController: self)
+ self.pageController.didMove(toParent: self)
}
override func viewWillAppear(_ animated: Bool) {
@@ -140,9 +140,9 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
if pageControl != nil {
pageControl.currentPage = arrayOfImage.count - index! - 1
if pageControl.currentPage == arrayOfImage.count - 1 {
- self.alertview.buttonBottom.setTitle(alertview.titleGotItButton, for: UIControlState())
+ self.alertview.buttonBottom.setTitle(alertview.titleGotItButton, for: UIControl.State())
} else {
- self.alertview.buttonBottom.setTitle(alertview.titleSkipButton, for: UIControlState())
+ self.alertview.buttonBottom.setTitle(alertview.titleSkipButton, for: UIControl.State())
}
}
}
@@ -170,7 +170,7 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
}
fileprivate func configurePageViewController(){
- self.pageController = UIPageViewController(transitionStyle: UIPageViewControllerTransitionStyle.scroll, navigationOrientation: UIPageViewControllerNavigationOrientation.horizontal, options: nil)
+ self.pageController = UIPageViewController(transitionStyle: UIPageViewController.TransitionStyle.scroll, navigationOrientation: UIPageViewController.NavigationOrientation.horizontal, options: nil)
self.pageController.view.backgroundColor = UIColor.clear
if #available(iOS 9.0, *) {
@@ -189,7 +189,7 @@ class AlertPageViewController: UIViewController, UIPageViewControllerDataSource,
self.viewControllers = [initialViewController!]
self.pageController.setViewControllers(viewControllers, direction: .forward, animated: false, completion: nil)
- self.addChildViewController(self.pageController)
+ self.addChild(self.pageController)
}
//MARK: Called after notification orientation changement
diff --git a/AlertOnboarding/AppDelegate.swift b/AlertOnboarding/AppDelegate.swift
index 4d7a9c2..20366b2 100644
--- a/AlertOnboarding/AppDelegate.swift
+++ b/AlertOnboarding/AppDelegate.swift
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
diff --git a/AlertOnboarding/Info.plist b/AlertOnboarding/Info.plist
index d052473..2b02ec4 100644
--- a/AlertOnboarding/Info.plist
+++ b/AlertOnboarding/Info.plist
@@ -31,8 +31,6 @@
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad