Skip to content

Commit

Permalink
2.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dehli committed Nov 17, 2016
1 parent e0750f7 commit 51b4147
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 33 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.0.0

- Upgraded project to Swift 3.0.1 (thanks to @sirnacnud!)
- Set correct content scale on image contexts (also thanks to @sirnacnud!)
- Added some comments

# 1.3.1

- Refactored project into 3 separate files (for each class)
Expand Down
4 changes: 2 additions & 2 deletions Demo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- TouchDraw (1.3.1)
- TouchDraw (2.0.0)

DEPENDENCIES:
- TouchDraw (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
TouchDraw: 5a38513da04853b4b5d6113ce644a8fe551ece3d
TouchDraw: bc0e17b0c7739313fda2a0d325a7d3a15cb15c5b

PODFILE CHECKSUM: 128c20294ac26c273a7852d89e7a811f030aef02

Expand Down
4 changes: 2 additions & 2 deletions Demo/Pods/Local Podspecs/TouchDraw.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Demo/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Demo/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Demo/Pods/Target Support Files/TouchDraw/Info.plist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion Demo/TouchDrawDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0810;
ORGANIZATIONNAME = "Christian Paul Dehli";
TargetAttributes = {
EE43D46C1A14A6F200311C06 = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0810;
};
};
};
Expand Down Expand Up @@ -268,8 +269,10 @@
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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -278,6 +281,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand Down Expand Up @@ -311,15 +315,18 @@
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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand All @@ -329,6 +336,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -337,23 +345,27 @@
isa = XCBuildConfiguration;
baseConfigurationReference = A361851B2B8E807E7EFAF51F /* Pods-TouchDrawDemo.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = TouchDrawDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.dehli.touchdraw;
PRODUCT_NAME = TouchDrawDemo;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
EE43D48E1A14A6F200311C06 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5484535A4A7D30269DA6B1DD /* Pods-TouchDrawDemo.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = TouchDrawDemo/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.dehli.touchdraw;
PRODUCT_NAME = TouchDrawDemo;
SWIFT_VERSION = 3.0;
};
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 = "0730"
LastUpgradeVersion = "0810"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Demo/TouchDrawDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return true
}
}
36 changes: 18 additions & 18 deletions Demo/TouchDrawDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,75 +15,75 @@ class ViewController: UIViewController, TouchDrawViewDelegate {
@IBOutlet weak var redoButton: UIButton!
@IBOutlet weak var clearButton: UIBarButtonItem!

private var deltaWidth = 2.0
fileprivate var deltaWidth = 2.0

override func viewDidLoad() {
super.viewDidLoad()

drawView.delegate = self
drawView.setWidth(CGFloat(deltaWidth))

undoButton.enabled = false
redoButton.enabled = false
clearButton.enabled = false
undoButton.isEnabled = false
redoButton.isEnabled = false
clearButton.isEnabled = false
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

@IBAction func clear(sender: AnyObject) {
@IBAction func clear(_ sender: AnyObject) {
drawView.clearDrawing()
}

// Slider can vary from 1 to 10
@IBAction func sliderChanged(sender: UISlider) {
@IBAction func sliderChanged(_ sender: UISlider) {
let newWidth = Double(sender.value) * deltaWidth
drawView.setWidth(CGFloat(newWidth))
}

@IBAction func randomColor(sender: AnyObject) {
let r = CGFloat(random() % 255) / 255
let g = CGFloat(random() % 255) / 255
let b = CGFloat(random() % 255) / 255
@IBAction func randomColor(_ sender: AnyObject) {
let r = CGFloat(arc4random() % 255) / 255
let g = CGFloat(arc4random() % 255) / 255
let b = CGFloat(arc4random() % 255) / 255

let color = UIColor(red: r, green: g, blue: b, alpha: 1.0)
drawView.setColor(color)
}

@IBAction func undo(sender: AnyObject) {
@IBAction func undo(_ sender: AnyObject) {
drawView.undo()
}

@IBAction func redo(sender: AnyObject) {
@IBAction func redo(_ sender: AnyObject) {
drawView.redo()
}

// MARK: - TouchDrawViewDelegate

func undoEnabled() {
self.undoButton.enabled = true
self.undoButton.isEnabled = true
}

func undoDisabled() {
self.undoButton.enabled = false
self.undoButton.isEnabled = false
}

func redoEnabled() {
self.redoButton.enabled = true
self.redoButton.isEnabled = true
}

func redoDisabled() {
self.redoButton.enabled = false
self.redoButton.isEnabled = false
}

func clearEnabled() {
self.clearButton.enabled = true
self.clearButton.isEnabled = true
}

func clearDisabled() {
self.clearButton.enabled = false
self.clearButton.isEnabled = false
}
}

2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Parts of TouchDrawView are broken in Swift 3.0

import PackageDescription

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The easiest way to include `TouchDraw` is by using `CocoaPods` and adding the fo

```
use_frameworks!
pod 'TouchDraw', '~> 1.3'
pod 'TouchDraw', '~> 2.0'
```

If you're not using CocoaPods, you can add the `TouchDrawView.swift` file to your project.
Expand Down
2 changes: 1 addition & 1 deletion TouchDraw.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Pod::Spec.new do |s|

s.name = "TouchDraw"
s.version = "1.3.1"
s.version = "2.0.0"
s.summary = "TouchDraw is a UIView you can draw on."

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion TouchDraw/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3.1</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 51b4147

Please sign in to comment.