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 #44 from morizotter/enabling-original-image
Browse files Browse the repository at this point in the history
Enabling original image
  • Loading branch information
morizotter committed May 12, 2015
2 parents f97cf9f + ed4f41e commit 6d33021
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Example/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

// // Initialize with config - githubcat
// var config = TouchVisualizerConfig()
// config.color = UIColor.lightGrayColor()
// config.color = UIColor.blackColor()
// config.showsTimer = true
// config.showsTouchRadius = true
// config.showsLog = true
Expand All @@ -32,7 +32,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// // Initialize with config - potatotips
// var config = TouchVisualizerConfig()
// config.color = UIColor.orangeColor()
// config.image = UIImage(named: "potatotips")
// config.image = UIImage(named: "potatotips")?.imageWithRenderingMode(.AlwaysTemplate)
// config.showsTouchRadius = true
// TouchVisualizer.start(config)

Expand Down
1 change: 0 additions & 1 deletion Pod/Classes/TouchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ final public class TouchView: UIImageView {
set(value) {
_config = value
image = self.config.image
image = image?.imageWithRenderingMode(.AlwaysTemplate)
tintColor = self.config.color
timerLabel.textColor = self.config.color
}
Expand Down
10 changes: 4 additions & 6 deletions Pod/Classes/TouchVisualizerConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ public struct TouchVisualizerConfig {
/**
Color of touch points.
*/
public var color: UIColor = {
UIColor(red: 52/255.0, green: 152/255.0, blue: 219/255.0, alpha: 0.8)
}()
public var color: UIColor? = UIColor(red: 52/255.0, green: 152/255.0, blue: 219/255.0, alpha: 0.8)

/**
Image of touch points.
Expand All @@ -24,11 +22,11 @@ public struct TouchVisualizerConfig {
let rect = CGRectMake(0, 0, 60.0, 60.0);
UIGraphicsBeginImageContextWithOptions(rect.size, false, 0)
let contextRef = UIGraphicsGetCurrentContext()
CGContextSetFillColorWithColor(contextRef, UIColor.blackColor().CGColor)
CGContextSetFillColorWithColor(contextRef, UIColor(red: 52/255.0, green: 152/255.0, blue: 219/255.0, alpha: 0.8).CGColor)
CGContextFillEllipseInRect(contextRef, rect);
let image = UIGraphicsGetImageFromCurrentImageContext()
var image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext();
image.imageWithRenderingMode(.AlwaysTemplate)
image = image.imageWithRenderingMode(.AlwaysTemplate)
return image
}()

Expand Down
2 changes: 1 addition & 1 deletion TouchVisualizer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "TouchVisualizer"
s.version = "1.1.4"
s.version = "1.1.5"
s.summary = "Effective presentation with TouchVisualizer!"
s.description = <<-DESC
# Give a presentation more impressive with finter points.
Expand Down

0 comments on commit 6d33021

Please sign in to comment.