Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #64 from morizotter/morizotter/fix-example
Browse files Browse the repository at this point in the history
Fix example
  • Loading branch information
morizotter authored Jun 5, 2018
2 parents b9dcce8 + 16f1db1 commit 0e005cc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
10 changes: 8 additions & 2 deletions Demo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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? {
Expand Down Expand Up @@ -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])
}
}
6 changes: 5 additions & 1 deletion SwiftyDrop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = MORITANAOKI;
TargetAttributes = {
908543641B3690870037B0FD = {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
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 = "0900"
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -40,7 +40,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -70,7 +69,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
2 changes: 1 addition & 1 deletion SwiftyDrop/Drop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public enum DropState: DropStatable {
public var textAlignment: NSTextAlignment? {
switch self {
default:
return NSTextAlignment.center
return .center
}
}
}
Expand Down

0 comments on commit 0e005cc

Please sign in to comment.