From 379bf6fdeb66ebf25313b9a8421336a295c1ad6f Mon Sep 17 00:00:00 2001 From: Aleksandr Shoshiashvili Date: Wed, 14 Jun 2017 15:10:39 +0300 Subject: [PATCH] Add margin parameter Now you can set margin for spotlight --- .../Classes/AwesomeSpotlight.swift | 0 .../Classes/AwesomeSpotlightView.swift | 0 .../UserInterfaceState.xcuserstate | Bin 0 -> 11152 bytes .../AwesomeSpotlightViewDemo.xcscheme | 91 ++++++++++++++++++ .../xcschemes/xcschememanagement.plist | 22 +++++ .../Classes/AwesomeSpotlight.swift | 18 +++- .../Classes/AwesomeSpotlightView.swift | 44 ++++++--- .../ViewController.swift | 9 +- 8 files changed, 162 insertions(+), 22 deletions(-) mode change 100644 => 100755 AwesomeSpotlightView/Classes/AwesomeSpotlight.swift mode change 100644 => 100755 AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift create mode 100644 AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/project.xcworkspace/xcuserdata/aleksandr.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/AwesomeSpotlightViewDemo.xcscheme create mode 100644 AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/AwesomeSpotlightView/Classes/AwesomeSpotlight.swift b/AwesomeSpotlightView/Classes/AwesomeSpotlight.swift old mode 100644 new mode 100755 diff --git a/AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift b/AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift old mode 100644 new mode 100755 diff --git a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/project.xcworkspace/xcuserdata/aleksandr.xcuserdatad/UserInterfaceState.xcuserstate b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/project.xcworkspace/xcuserdata/aleksandr.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..a5f32aa4002cf444d73474614b466dabcba14439 GIT binary patch literal 11152 zcmdUVd3aMr_y5e?wn>xHEKRdFxk*Y9=)M;ax+6j8$1^ZV!byzoGhnKNh3IWy;TmU|o9 zJZ^s=J^diUh#&?MVrwU^cZ>^ZADL@ zZD>1s61{+SqZiR0^agqt9Y*h=Bj|l}6n%hBpp)ne^d3bx}aT#ak+96T3$a0_n5UfhPSz&`B9 z0emIy!W7?tm*5-mP55TK9IwFl;?;N!eiU!UTkvD}al92jfuF(8;ur94{5sx?58`+5 z2lzvL9G}Er;BWC6{42pkLHIR(T&~k!51+kvsV1?>$2`31xba94Tl7bu+;5ai!j-_7<)+;E*Sl=9QLYlojWsTp%`~i2XGXU=7kf%>@`U552mNpLu3@7nk<_~~|!m?tgpK}Elx&xh4 zxHhj3RF{RUQ0s1WdFS~Za_tnZ3DyWggl2geqC*x)N0}(88)eYgZj?o3yhce=o4hVA z70f%{9Y_sdn`-yA`4>#BEY<2n4irN5w znu3P$r&V+g&P<==^YUnuRy2?Eds{ern>XNbH_r~#xVd>39W3Qqynj8xFDvo327F$R zhx4WS=ecJE_M^+tICME0UoYIkR%Z)0Rrt#Jt0&sQj6ENzQ>lgc6A z{Qpg-i<+i{_b1MOQA-GF57eSMsD;`gf9QWhi;xBas!T=GQPO%;hw4!Snntx$NA=XO z9?d`wG!r?gktR?RHSh)g0bg{sv;m%+H&x^IyBj@R$!w?3*%aV> zQ=F~M-1N)bF0RPq8Rz%6bKrM_&s${YJaAh%SNJMh(evNWczVn1MGajUx%tU#W=?MU z0&!heRzV*8N?#z{Ko4qh$m1s3E7}82*tpaUAmeQXVb>uKYDE*KO|^C z4m1yR@1$001KkrT8-pvdhTL%v&(EE3+VXAhTQ1Ql#ug|E0sa(QR}%O`Z-=GZDPY9`Lza zo8dGrc6E6N77Wsg?&#qa4+(b{>PE^xXy44O%^Xg1B+ zgn9tVXQKPi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es/AwesomeSpotlightViewDemo.xcscheme b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/AwesomeSpotlightViewDemo.xcscheme new file mode 100644 index 0000000..41116d6 --- /dev/null +++ b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/AwesomeSpotlightViewDemo.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/xcschememanagement.plist b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..c01204e --- /dev/null +++ b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo.xcodeproj/xcuserdata/aleksandr.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + AwesomeSpotlightViewDemo.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 520617601E64AA6C008689A2 + + primary + + + + + diff --git a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlight.swift b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlight.swift index 9b897fb..7888314 100644 --- a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlight.swift +++ b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlight.swift @@ -8,8 +8,6 @@ import UIKit - - class AwesomeSpotlight: NSObject { enum AwesomeSpotlightShape { @@ -20,8 +18,10 @@ class AwesomeSpotlight: NSObject { var rect = CGRect() var shape : AwesomeSpotlightShape = .RoundRectangle + var margin = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) private var text : String = "" private var attributedText : NSAttributedString? = nil + private let zeroMargin = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) var showedText: NSAttributedString { if let attrText = attributedText { @@ -35,22 +35,30 @@ class AwesomeSpotlight: NSObject { return NSValue(cgRect: rect) } - init(withRect rect: CGRect, shape: AwesomeSpotlightShape, text: String) { + init(withRect rect: CGRect, + shape: AwesomeSpotlightShape, + text: String, + margin: UIEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)) { super.init() self.rect = rect self.shape = shape self.text = text + self.margin = margin } - init(withRect rect: CGRect, shape: AwesomeSpotlightShape, attributedText: NSAttributedString) { + init(withRect rect: CGRect, + shape: AwesomeSpotlightShape, + attributedText: NSAttributedString, + margin: UIEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)) { super.init() self.rect = rect self.shape = shape self.attributedText = attributedText + self.margin = margin } convenience override init() { - self.init(withRect: CGRect(), shape: .RoundRectangle, text: "test") + self.init(withRect: CGRect(), shape: .RoundRectangle, text: "test", margin: UIEdgeInsets()) } diff --git a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift index d611eac..3421fc6 100644 --- a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift +++ b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/AwesomeSpotlightView/Classes/AwesomeSpotlightView.swift @@ -146,20 +146,21 @@ class AwesomeSpotlightView: UIView { } // MARK: - Touches - + func userDidTap(_ recognizer: UITapGestureRecognizer) { goToSpotlightAtIndex(index: currentIndex + 1) } // MARK: - Presenter - + func start() { alpha = 0 isHidden = false + textLabel.font = textLabelFont UIView.animate(withDuration: animationDuration, animations: { self.alpha = 1 - }) { (finished) in - self.goToFirstSpotlight() + }) { (finished) in + self.goToFirstSpotlight() } } @@ -231,7 +232,7 @@ class AwesomeSpotlightView: UIView { setupContinueLabel() UIView.animate(withDuration: animationDuration, delay: 0.35, options: .curveLinear, animations: { self.continueLabel.alpha = 1 - }, completion: nil) + }, completion: nil) } else if index >= spotlightsArray.count - 1 && continueLabel.alpha != 0 { continueLabel.alpha = 0 continueLabel.removeFromSuperview() @@ -244,7 +245,7 @@ class AwesomeSpotlightView: UIView { setupSkipSpotlightButton() UIView.animate(withDuration: animationDuration, delay: 0.35, options: .curveLinear, animations: { self.skipSpotlightButton.alpha = 1 - }, completion: nil) + }, completion: nil) } } @@ -258,6 +259,18 @@ class AwesomeSpotlightView: UIView { // MARK: Helper + private func calculateRectWithMarginForSpotlight(_ spotlight: AwesomeSpotlight) -> CGRect { + var rect = spotlight.rect + + rect.size.width += spotlight.margin.left + spotlight.margin.right + rect.size.height += spotlight.margin.bottom + spotlight.margin.top + + rect.origin.x = rect.origin.x - (spotlight.margin.left + spotlight.margin.right) / 2.0 + rect.origin.y = rect.origin.y - (spotlight.margin.top + spotlight.margin.bottom) / 2.0 + + return rect + } + private func calculateTextPositionAndSizeWithSpotlight(spotlight: AwesomeSpotlight) { textLabel.frame = CGRect(x: 0, y: 0, width: maxLabelWidth, height: 0) textLabel.attributedText = spotlight.showedText @@ -268,7 +281,8 @@ class AwesomeSpotlightView: UIView { textLabel.sizeToFit() - let rect = spotlight.rect + let rect = calculateRectWithMarginForSpotlight(spotlight) + var y = rect.origin.y + rect.size.height + labelSpacing let bottomY = y + textLabel.frame.size.height + labelSpacing if bottomY > bounds.size.height { @@ -282,7 +296,7 @@ class AwesomeSpotlightView: UIView { // MARK: - Cutout and Animate private func cutoutToSpotlight(spotlight: AwesomeSpotlight, isFirst : Bool = false) -> UIBezierPath { - var rect = spotlight.rect + var rect = calculateRectWithMarginForSpotlight(spotlight) if isFirst { let x = floor(spotlight.rect.origin.x + (spotlight.rect.size.width / 2.0)) @@ -358,13 +372,13 @@ class AwesomeSpotlightView: UIView { delegate?.spotlightViewWillCleanup?(spotlightView: self) UIView.animate(withDuration: animationDuration, animations: { self.alpha = 0 - }) { (finished) in - self.removeFromSuperview() - self.currentIndex = 0 - self.textLabel.alpha = 0 - self.continueLabel.alpha = 0 - self.skipSpotlightButton.alpha = 0 - self.delegate?.spotlightViewDidCleanup?(spotlightView: self) + }) { (finished) in + self.removeFromSuperview() + self.currentIndex = 0 + self.textLabel.alpha = 0 + self.continueLabel.alpha = 0 + self.skipSpotlightButton.alpha = 0 + self.delegate?.spotlightViewDidCleanup?(spotlightView: self) } } diff --git a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/ViewController.swift b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/ViewController.swift index b4c5614..d559caf 100644 --- a/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/ViewController.swift +++ b/AwesomeSpotlightViewDemo/AwesomeSpotlightViewDemo/ViewController.swift @@ -45,11 +45,16 @@ class ViewController: UIViewController { } func setupSpotlight() { - let logoImageViewSpotlightRect = CGRect(x: logoImageView.frame.origin.x - 10, y: logoImageView.frame.origin.y - 10, width: logoImageView.frame.size.width + 18, height: logoImageView.frame.size.height + 18) - let logoImageViewSpotlight = AwesomeSpotlight(withRect: logoImageViewSpotlightRect, shape: .Circle, text: "logoImageViewSpotlight") + let logoImageViewSpotlightRect = CGRect(x: logoImageView.frame.origin.x, y: logoImageView.frame.origin.y, width: logoImageView.frame.size.width, height: logoImageView.frame.size.height) + let logoImageViewSpotlightMargin = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20) + let logoImageViewSpotlight = AwesomeSpotlight(withRect: logoImageViewSpotlightRect, shape: .Circle, text: "logoImageViewSpotlight", margin: logoImageViewSpotlightMargin) + let nameLabelSpotlight = AwesomeSpotlight(withRect: nameLabel.frame, shape: .Rectangle, text: "nameLabelSpotlight") + let showButtonSpotSpotlight = AwesomeSpotlight(withRect: showButton.frame, shape: .RoundRectangle, text: "showButtonSpotSpotlight") + let showWithContinueAndSkipButtonSpotlight = AwesomeSpotlight(withRect: showWithContinueAndSkipButton.frame, shape: .RoundRectangle, text: "showWithContinueAndSkipButtonSpotlight") + let showAllAtOnceButtonSpotlight = AwesomeSpotlight(withRect: showAllAtOnceButton.frame, shape: .RoundRectangle, text: "showAllAtOnceButtonSpotlight") spotlightView = AwesomeSpotlightView(frame: view.frame, spotlight: [logoImageViewSpotlight, nameLabelSpotlight, showButtonSpotSpotlight, showWithContinueAndSkipButtonSpotlight, showAllAtOnceButtonSpotlight])