diff --git a/ALSpotlightView.podspec b/ALSpotlightView.podspec
index 8b9cad3..0bb2643 100644
--- a/ALSpotlightView.podspec
+++ b/ALSpotlightView.podspec
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "ALSpotlightView"
- s.version = "0.0.2"
+ s.version = "0.0.5"
s.summary = "Custom control that simulates a modal spotlight effect."
s.homepage = "http://github.com/al7/ALSpotlightView"
s.license = "MIT"
s.author = { "Alex Leite" => "admin@al7dev.com" }
- s.platform = :ios, "8.0"
- s.source = { :git => "https://github.com/al7/ALSpotlightView.git", :tag => "0.0.3" }
+ s.platform = :ios, "9.0"
+ s.source = { :git => "https://github.com/al7/ALSpotlightView.git", :tag => "0.0.5" }
s.source_files = "ALSpotlightView/Source", "ALSpotlightView/Source/**/*.{h,m,swift}"
s.requires_arc = true
diff --git a/ALSpotlightView.xcodeproj/project.pbxproj b/ALSpotlightView.xcodeproj/project.pbxproj
index ad7b8a8..8496fe7 100644
--- a/ALSpotlightView.xcodeproj/project.pbxproj
+++ b/ALSpotlightView.xcodeproj/project.pbxproj
@@ -161,14 +161,16 @@
137ACA4C1A9EEFC8006689AC /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0610;
+ LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "Alexandre Leite";
TargetAttributes = {
137ACA531A9EEFC8006689AC = {
CreatedOnToolsVersion = 6.1.1;
+ LastSwiftMigration = 0820;
};
137ACA681A9EEFC8006689AC = {
CreatedOnToolsVersion = 6.1.1;
+ LastSwiftMigration = 0820;
TestTargetID = 137ACA531A9EEFC8006689AC;
};
};
@@ -248,20 +250,30 @@
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_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_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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
+ 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",
@@ -274,11 +286,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.1;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = "";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -291,13 +304,21 @@
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_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_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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -305,15 +326,18 @@
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;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.1;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
+ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ SWIFT_VERSION = "";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -326,7 +350,9 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = ALSpotlightView/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.al7dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -337,7 +363,9 @@
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = ALSpotlightView/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.al7dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
};
name = Release;
};
@@ -355,7 +383,9 @@
);
INFOPLIST_FILE = ALSpotlightViewTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.al7dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ALSpotlightView.app/ALSpotlightView";
};
name = Debug;
@@ -370,7 +400,9 @@
);
INFOPLIST_FILE = ALSpotlightViewTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.al7dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ALSpotlightView.app/ALSpotlightView";
};
name = Release;
@@ -394,6 +426,7 @@
137ACA751A9EEFC8006689AC /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
137ACA761A9EEFC8006689AC /* Build configuration list for PBXNativeTarget "ALSpotlightViewTests" */ = {
isa = XCConfigurationList;
@@ -402,6 +435,7 @@
137ACA781A9EEFC8006689AC /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
diff --git a/ALSpotlightView/AppDelegate.swift b/ALSpotlightView/AppDelegate.swift
index 7a3bf12..b539810 100644
--- a/ALSpotlightView/AppDelegate.swift
+++ b/ALSpotlightView/AppDelegate.swift
@@ -12,32 +12,32 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
- func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
- self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
- self.window?.backgroundColor = UIColor.whiteColor()
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ self.window = UIWindow(frame: UIScreen.main.bounds)
+ self.window?.backgroundColor = UIColor.white
self.window?.rootViewController = ViewController()
self.window?.makeKeyAndVisible()
return true
}
- func applicationWillResignActive(application: UIApplication) {
+ func applicationWillResignActive(_ application: UIApplication) {
}
- func applicationDidEnterBackground(application: UIApplication) {
+ func applicationDidEnterBackground(_ application: UIApplication) {
}
- func applicationWillEnterForeground(application: UIApplication) {
+ func applicationWillEnterForeground(_ application: UIApplication) {
}
- func applicationDidBecomeActive(application: UIApplication) {
+ func applicationDidBecomeActive(_ application: UIApplication) {
}
- func applicationWillTerminate(application: UIApplication) {
+ func applicationWillTerminate(_ application: UIApplication) {
}
diff --git a/ALSpotlightView/Info.plist b/ALSpotlightView/Info.plist
index 6dcf8e9..2e9d12e 100644
--- a/ALSpotlightView/Info.plist
+++ b/ALSpotlightView/Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
- com.al7dev.$(PRODUCT_NAME:rfc1034identifier)
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/ALSpotlightView/Source/ALSpotlightView.swift b/ALSpotlightView/Source/ALSpotlightView.swift
index 78a38e6..33158cf 100644
--- a/ALSpotlightView/Source/ALSpotlightView.swift
+++ b/ALSpotlightView/Source/ALSpotlightView.swift
@@ -1,17 +1,13 @@
/*
-
Copyright (c) 2015 - Alex Leite (al7dev)
-
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -19,140 +15,145 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-
*/
import UIKit
public typealias SpotlightTapHandler = () -> Void
-public class ALSpotlightView: UIView {
-
- public var spotlightCenter: CGPoint = CGPoint(x: 0.5, y: 0.5)
- public var spotlightRadius: CGFloat = 200.0
- public var modalOpacity: CGFloat = 0.6
- private weak var _targetView: UIView?
- public var targetView: UIView? { get { return _targetView } }
- public var onTapHandler: SpotlightTapHandler?
-
- public init(spotlightCenter: CGPoint, spotlightRadius: CGFloat = 200.0, modalOpacity: CGFloat = 0.6, onTapHandler: SpotlightTapHandler? = nil) {
- super.init(frame: CGRectZero)
- self.backgroundColor = UIColor.clearColor()
- self.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
- self.spotlightRadius = spotlightRadius
- self.spotlightCenter = spotlightCenter
- self.modalOpacity = modalOpacity
- self.onTapHandler = onTapHandler
- }
-
- override public init(frame: CGRect) {
- fatalError("init(frame:) not available. Please use designated initializer")
- }
-
- required public init(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- //MARK- Base Overrides
-
- public override func drawRect(rect: CGRect) {
- let context = UIGraphicsGetCurrentContext()
- let colorSpace = CGColorSpaceCreateDeviceRGB()
- let locations: [CGFloat] = [0.0, 1.0]
- let colors: [CGFloat] = [
- 0.0, 0.0, 0.0, 0.0,
- 0.0, 0.0, 0.0, self.modalOpacity
- ]
- let gradient = CGGradientCreateWithColorComponents(colorSpace, colors, locations, 2)
-
- let gradientCenter = CGPoint(x: self.spotlightCenter.x * rect.size.width, y: self.spotlightCenter.y * rect.size.height)
- let startPoint = gradientCenter
- let startRadius: CGFloat = 0.0
- let endPoint = gradientCenter
- let endRadius = self.spotlightRadius
-
- CGContextDrawRadialGradient(context, gradient, startPoint, startRadius, endPoint, endRadius, .DrawsAfterEndLocation)
- }
-
- public override func layoutSubviews() {
- self.setNeedsDisplay()
- }
-
- //MARK- Public Methods
-
- public func showInView(view: UIView?, animated: Bool = true, duration: NSTimeInterval = 0.3) {
- self._targetView = (view != nil) ? view : UIApplication.sharedApplication().keyWindow
- if let tv = self.targetView {
- self.alpha = 0.0
- self.frame = tv.bounds
- self.setNeedsDisplay()
- tv.addSubview(self)
-
- let animation: () -> Void = {
- self.alpha = 1.0
- }
-
- let completion: (Bool) -> Void = {
- finished in
-
- let tapRecognizer = UITapGestureRecognizer(target: self, action: "onSpotlightViewTap:")
- tapRecognizer.numberOfTapsRequired = 1
- self.addGestureRecognizer(tapRecognizer)
- }
-
- if animated {
- UIView.animateWithDuration(duration, animations: animation, completion: completion)
- }
- else {
- animation()
- }
- }
- }
-
- public func show(animated: Bool = true) {
- self.showInView(nil, animated: animated)
- }
-
- public func hide(animated: Bool = true, duration: NSTimeInterval = 0.3) {
- self.clearGestureRecognizers()
- self.onTapHandler = nil
-
- let animation: () -> Void = {
- self.alpha = 0.0
- }
-
- let completion: (Bool) -> Void = {
- finished in
-
- self._targetView = nil
- self.removeFromSuperview()
- }
-
- if animated {
- UIView.animateWithDuration(duration, animations: animation, completion: completion)
- }
- else {
- animation()
- completion(true)
- }
- }
-
- //MARK- Helper Methods
-
- private func clearGestureRecognizers() {
- if let recognizers = self.gestureRecognizers {
- for recognizer in recognizers {
- self.removeGestureRecognizer(recognizer)
- }
- }
- }
-
- //MARK- Action Targets
-
- func onSpotlightViewTap(sender: UITapGestureRecognizer) {
- if let handler = self.onTapHandler {
- handler()
- }
- }
-
-}
\ No newline at end of file
+open class ALSpotlightView: UIView {
+
+ open var spotlightCenter: CGPoint = CGPoint(x: 0.5, y: 0.5)
+ open var spotlightRadius: CGFloat = 200.0
+ open var modalOpacity: CGFloat = 0.6
+ fileprivate weak var _targetView: UIView?
+ open var targetView: UIView? { get { return _targetView } }
+ open var onTapHandler: SpotlightTapHandler?
+
+ public init(spotlightCenter: CGPoint, spotlightRadius: CGFloat = 200.0, modalOpacity: CGFloat = 0.6, onTapHandler: SpotlightTapHandler? = nil) {
+ super.init(frame: CGRect.zero)
+ self.backgroundColor = UIColor.clear
+ self.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+ self.spotlightRadius = spotlightRadius
+ self.spotlightCenter = spotlightCenter
+ self.modalOpacity = modalOpacity
+ self.onTapHandler = onTapHandler
+ }
+
+ override public init(frame: CGRect) {
+ fatalError("init(frame:) not available. Please use designated initializer")
+ }
+
+ required public init(coder aDecoder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+ //MARK- Base Overrides
+
+ open override func draw(_ rect: CGRect) {
+
+ guard let context = UIGraphicsGetCurrentContext() else {
+ return
+ }
+
+ let colorSpace = CGColorSpaceCreateDeviceRGB()
+ let locations: [CGFloat] = [0.0, 1.0]
+ let colors: [CGFloat] = [
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, self.modalOpacity
+ ]
+
+ guard let gradient = CGGradient(colorSpace: colorSpace, colorComponents: colors, locations: locations, count: 2) else {
+ return
+ }
+
+ let gradientCenter = CGPoint(x: self.spotlightCenter.x * rect.size.width, y: self.spotlightCenter.y * rect.size.height)
+ let startPoint = gradientCenter
+ let startRadius: CGFloat = 0.0
+ let endPoint = gradientCenter
+ let endRadius = self.spotlightRadius
+
+ context.drawRadialGradient(gradient, startCenter: startPoint, startRadius: startRadius, endCenter: endPoint, endRadius: endRadius, options: .drawsAfterEndLocation)
+ }
+
+ open override func layoutSubviews() {
+ self.setNeedsDisplay()
+ }
+
+ //MARK- Public Methods
+
+ open func showInView(_ view: UIView?, animated: Bool = true, duration: TimeInterval = 0.3) {
+ self._targetView = (view != nil) ? view : UIApplication.shared.keyWindow
+ if let tv = self.targetView {
+ self.alpha = 0.0
+ self.frame = tv.bounds
+ self.setNeedsDisplay()
+ tv.addSubview(self)
+
+ let animation: () -> Void = {
+ self.alpha = 1.0
+ }
+
+ let completion: (Bool) -> Void = {
+ finished in
+
+ let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(ALSpotlightView.onSpotlightViewTap(_:)))
+ tapRecognizer.numberOfTapsRequired = 1
+ self.addGestureRecognizer(tapRecognizer)
+ }
+
+ if animated {
+ UIView.animate(withDuration: duration, animations: animation, completion: completion)
+ }
+ else {
+ animation()
+ }
+ }
+ }
+
+ open func show(_ animated: Bool = true) {
+ self.showInView(nil, animated: animated)
+ }
+
+ open func hide(_ animated: Bool = true, duration: TimeInterval = 0.3) {
+ self.clearGestureRecognizers()
+ self.onTapHandler = nil
+
+ let animation: () -> Void = {
+ self.alpha = 0.0
+ }
+
+ let completion: (Bool) -> Void = {
+ finished in
+
+ self._targetView = nil
+ self.removeFromSuperview()
+ }
+
+ if animated {
+ UIView.animate(withDuration: duration, animations: animation, completion: completion)
+ }
+ else {
+ animation()
+ completion(true)
+ }
+ }
+
+ //MARK- Helper Methods
+
+ fileprivate func clearGestureRecognizers() {
+ if let recognizers = self.gestureRecognizers {
+ for recognizer in recognizers {
+ self.removeGestureRecognizer(recognizer)
+ }
+ }
+ }
+
+ //MARK- Action Targets
+
+ @objc func onSpotlightViewTap(_ sender: UITapGestureRecognizer) {
+ if let handler = self.onTapHandler {
+ handler()
+ }
+ }
+}
diff --git a/ALSpotlightView/ViewController.swift b/ALSpotlightView/ViewController.swift
index a021c3d..38b4e68 100644
--- a/ALSpotlightView/ViewController.swift
+++ b/ALSpotlightView/ViewController.swift
@@ -11,14 +11,14 @@ class ViewController: UIViewController {
//MARK- View lifecycle
override func loadView() {
- self.view = UIView(frame: UIScreen.mainScreen().bounds)
- self.view.backgroundColor = UIColor.whiteColor()
+ self.view = UIView(frame: UIScreen.main.bounds)
+ self.view.backgroundColor = UIColor.white
let label = UILabel(frame: self.view.bounds)
- label.textAlignment = .Center
- label.autoresizingMask = .FlexibleWidth | .FlexibleHeight
+ label.textAlignment = .center
+ label.autoresizingMask = [.flexibleWidth, .flexibleHeight]
label.numberOfLines = 0
- label.lineBreakMode = .ByWordWrapping
+ label.lineBreakMode = .byWordWrapping
label.text = "Tap Anywhere in screen\nto see Spotlight View"
self.view.addSubview(label)
}
@@ -26,16 +26,16 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
- let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: "onTap:")
+ let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.onTap(_:)))
tapGestureRecognizer.numberOfTapsRequired = 1
self.view.addGestureRecognizer(tapGestureRecognizer)
}
//MARK- Tap Gesture Recognizer
- func onTap(sender: UITapGestureRecognizer) {
- let location = sender.locationInView(self.view)
- var spotlightCenter = CGPointZero
+ @objc func onTap(_ sender: UITapGestureRecognizer) {
+ let location = sender.location(in: self.view)
+ var spotlightCenter = CGPoint.zero
spotlightCenter.x = location.x / self.view.bounds.size.width
spotlightCenter.y = location.y / self.view.bounds.size.height
diff --git a/ALSpotlightViewTests/ALSpotlightViewTests.swift b/ALSpotlightViewTests/ALSpotlightViewTests.swift
index 63c7775..62582d5 100644
--- a/ALSpotlightViewTests/ALSpotlightViewTests.swift
+++ b/ALSpotlightViewTests/ALSpotlightViewTests.swift
@@ -28,7 +28,7 @@ class ALSpotlightViewTests: XCTestCase {
func testPerformanceExample() {
// This is an example of a performance test case.
- self.measureBlock() {
+ self.measure() {
// Put the code you want to measure the time of here.
}
}
diff --git a/ALSpotlightViewTests/Info.plist b/ALSpotlightViewTests/Info.plist
index 87ccc92..ba72822 100644
--- a/ALSpotlightViewTests/Info.plist
+++ b/ALSpotlightViewTests/Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
- com.al7dev.$(PRODUCT_NAME:rfc1034identifier)
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName