diff --git a/Demo/ViewController.swift b/Demo/ViewController.swift index 75cb564..4d18a49 100644 --- a/Demo/ViewController.swift +++ b/Demo/ViewController.swift @@ -55,6 +55,7 @@ class ViewController: UIViewController { let customAction = UIAlertAction(title: "Custom", style: .default) { _ in enum Custom: DropStatable { case blackGreen + var backgroundColor: UIColor? { switch self { case .blackGreen: return .black @@ -67,7 +68,12 @@ class ViewController: UIViewController { } var textColor: UIColor? { switch self { - case .blackGreen: return .green + case .blackGreen: return .green + } + } + var textAlignment: NSTextAlignment? { + switch self { + case .blackGreen: return NSTextAlignment.left } } var blurEffect: UIBlurEffect? { @@ -129,7 +135,7 @@ class ViewController: UIViewController { func sampleText() -> String { let text = "Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda." let length = Int(arc4random_uniform(100)) + 10 - let end = text.characters.index(text.startIndex, offsetBy: length) + let end = text.index(text.startIndex, offsetBy: length) return String(text[text.startIndex ..< end]) } } diff --git a/SwiftyDrop.xcodeproj/project.pbxproj b/SwiftyDrop.xcodeproj/project.pbxproj index eb0ad6f..13d65cd 100644 --- a/SwiftyDrop.xcodeproj/project.pbxproj +++ b/SwiftyDrop.xcodeproj/project.pbxproj @@ -166,7 +166,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0940; ORGANIZATIONNAME = MORITANAOKI; TargetAttributes = { 908543641B3690870037B0FD = { @@ -312,12 +312,14 @@ 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_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; @@ -366,12 +368,14 @@ 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_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; diff --git a/SwiftyDrop.xcodeproj/xcshareddata/xcschemes/SwiftyDrop.xcscheme b/SwiftyDrop.xcodeproj/xcshareddata/xcschemes/SwiftyDrop.xcscheme index 089e382..86c233b 100644 --- a/SwiftyDrop.xcodeproj/xcshareddata/xcschemes/SwiftyDrop.xcscheme +++ b/SwiftyDrop.xcodeproj/xcshareddata/xcschemes/SwiftyDrop.xcscheme @@ -1,6 +1,6 @@