From 7a2be5b47f15fd5865e1542e8f4d82d88e570ccc Mon Sep 17 00:00:00 2001 From: Fernando Moya de Rivas Date: Tue, 4 Sep 2018 15:12:27 +0200 Subject: [PATCH] Renaming project --- .../BubbleShowCase.xcodeproj}/project.pbxproj | 30 +++---- .../contents.xcworkspacedata | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../BubbleShowCase/BubbleShowCase.podspec | 2 +- .../BubbleShowCase/BubbleShowCase.swift | 70 ++++++++-------- .../BubbleShowCaseShowCase.podspec | 0 .../BubbleShowCase}/Info.plist | 0 .../BubbleShowCase}/ShowCase.h | 0 Sample/Podfile.lock | 4 +- .../ShowCase}/ShowCase/BubbleShowCase.swift | 0 Sample/Pods/Manifest.lock | 4 +- Sample/Pods/Pods.xcodeproj/project.pbxproj | 82 +++++++++---------- .../BubbleShowCase/Info.plist | 2 +- .../ShowCaseViewController.swift | 35 ++++---- 14 files changed, 116 insertions(+), 115 deletions(-) rename {ShowCase/ShowCase.xcodeproj => BubbleShowCase/BubbleShowCase.xcodeproj}/project.pbxproj (92%) rename {ShowCase/ShowCase.xcodeproj => BubbleShowCase/BubbleShowCase.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (50%) rename {ShowCase/ShowCase.xcodeproj => BubbleShowCase/BubbleShowCase.xcodeproj}/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename ShowCase/ShowCase/ShowCase.podspec => BubbleShowCase/BubbleShowCase/BubbleShowCase.podspec (97%) rename Sample/Pods/BubbleShowCase/ShowCase/ShowCase/ShowCase.swift => BubbleShowCase/BubbleShowCase/BubbleShowCase.swift (93%) rename ShowCase/ShowCase/BubbleShowCase.podspec => BubbleShowCase/BubbleShowCase/BubbleShowCaseShowCase.podspec (100%) rename {ShowCase/ShowCase => BubbleShowCase/BubbleShowCase}/Info.plist (100%) rename {ShowCase/ShowCase => BubbleShowCase/BubbleShowCase}/ShowCase.h (100%) rename {ShowCase => Sample/Pods/BubbleShowCase/ShowCase}/ShowCase/BubbleShowCase.swift (100%) diff --git a/ShowCase/ShowCase.xcodeproj/project.pbxproj b/BubbleShowCase/BubbleShowCase.xcodeproj/project.pbxproj similarity index 92% rename from ShowCase/ShowCase.xcodeproj/project.pbxproj rename to BubbleShowCase/BubbleShowCase.xcodeproj/project.pbxproj index c3103ab..a4d7360 100644 --- a/ShowCase/ShowCase.xcodeproj/project.pbxproj +++ b/BubbleShowCase/BubbleShowCase.xcodeproj/project.pbxproj @@ -12,7 +12,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - B0EE5290213E89F7003E84EC /* ShowCase.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ShowCase.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B0EE5290213E89F7003E84EC /* BubbleShowCase.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BubbleShowCase.framework; sourceTree = BUILT_PRODUCTS_DIR; }; B0EE5293213E89F7003E84EC /* ShowCase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShowCase.h; sourceTree = ""; }; B0EE5294213E89F7003E84EC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B0EE529B213E8A97003E84EC /* BubbleShowCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BubbleShowCase.swift; sourceTree = ""; }; @@ -32,7 +32,7 @@ B0EE5286213E89F7003E84EC = { isa = PBXGroup; children = ( - B0EE5292213E89F7003E84EC /* ShowCase */, + B0EE5292213E89F7003E84EC /* BubbleShowCase */, B0EE5291213E89F7003E84EC /* Products */, ); sourceTree = ""; @@ -40,19 +40,19 @@ B0EE5291213E89F7003E84EC /* Products */ = { isa = PBXGroup; children = ( - B0EE5290213E89F7003E84EC /* ShowCase.framework */, + B0EE5290213E89F7003E84EC /* BubbleShowCase.framework */, ); name = Products; sourceTree = ""; }; - B0EE5292213E89F7003E84EC /* ShowCase */ = { + B0EE5292213E89F7003E84EC /* BubbleShowCase */ = { isa = PBXGroup; children = ( B0EE5293213E89F7003E84EC /* ShowCase.h */, B0EE529B213E8A97003E84EC /* BubbleShowCase.swift */, B0EE5294213E89F7003E84EC /* Info.plist */, ); - path = ShowCase; + path = BubbleShowCase; sourceTree = ""; }; /* End PBXGroup section */ @@ -69,9 +69,9 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - B0EE528F213E89F7003E84EC /* ShowCase */ = { + B0EE528F213E89F7003E84EC /* BubbleShowCase */ = { isa = PBXNativeTarget; - buildConfigurationList = B0EE5298213E89F7003E84EC /* Build configuration list for PBXNativeTarget "ShowCase" */; + buildConfigurationList = B0EE5298213E89F7003E84EC /* Build configuration list for PBXNativeTarget "BubbleShowCase" */; buildPhases = ( B0EE528B213E89F7003E84EC /* Sources */, B0EE528C213E89F7003E84EC /* Frameworks */, @@ -82,9 +82,9 @@ ); dependencies = ( ); - name = ShowCase; + name = BubbleShowCase; productName = ShowCase; - productReference = B0EE5290213E89F7003E84EC /* ShowCase.framework */; + productReference = B0EE5290213E89F7003E84EC /* BubbleShowCase.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -102,7 +102,7 @@ }; }; }; - buildConfigurationList = B0EE528A213E89F7003E84EC /* Build configuration list for PBXProject "ShowCase" */; + buildConfigurationList = B0EE528A213E89F7003E84EC /* Build configuration list for PBXProject "BubbleShowCase" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; @@ -114,7 +114,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - B0EE528F213E89F7003E84EC /* ShowCase */, + B0EE528F213E89F7003E84EC /* BubbleShowCase */, ); }; /* End PBXProject section */ @@ -272,7 +272,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = ShowCase/Info.plist; + INFOPLIST_FILE = BubbleShowCase/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -299,7 +299,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = ShowCase/Info.plist; + INFOPLIST_FILE = BubbleShowCase/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -317,7 +317,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - B0EE528A213E89F7003E84EC /* Build configuration list for PBXProject "ShowCase" */ = { + B0EE528A213E89F7003E84EC /* Build configuration list for PBXProject "BubbleShowCase" */ = { isa = XCConfigurationList; buildConfigurations = ( B0EE5296213E89F7003E84EC /* Debug */, @@ -326,7 +326,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B0EE5298213E89F7003E84EC /* Build configuration list for PBXNativeTarget "ShowCase" */ = { + B0EE5298213E89F7003E84EC /* Build configuration list for PBXNativeTarget "BubbleShowCase" */ = { isa = XCConfigurationList; buildConfigurations = ( B0EE5299213E89F7003E84EC /* Debug */, diff --git a/ShowCase/ShowCase.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/BubbleShowCase/BubbleShowCase.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 50% rename from ShowCase/ShowCase.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to BubbleShowCase/BubbleShowCase.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 616ccba..b5de066 100644 --- a/ShowCase/ShowCase.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/BubbleShowCase/BubbleShowCase.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:/Users/fmoya/Documents/Repositories/ShowCase-iOS/ShowCase/BubbleShowCase.xcodeproj"> diff --git a/ShowCase/ShowCase.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/BubbleShowCase/BubbleShowCase.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from ShowCase/ShowCase.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to BubbleShowCase/BubbleShowCase.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/ShowCase/ShowCase/ShowCase.podspec b/BubbleShowCase/BubbleShowCase/BubbleShowCase.podspec similarity index 97% rename from ShowCase/ShowCase/ShowCase.podspec rename to BubbleShowCase/BubbleShowCase/BubbleShowCase.podspec index 98e96dc..ee77455 100644 --- a/ShowCase/ShowCase/ShowCase.podspec +++ b/BubbleShowCase/BubbleShowCase/BubbleShowCase.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "BubbleShowCase" - s.version = "0.0.1" + s.version = "0.0.3" s.summary = "A wonderful way to show case your users your App features" s.description = <<-DESC diff --git a/Sample/Pods/BubbleShowCase/ShowCase/ShowCase/ShowCase.swift b/BubbleShowCase/BubbleShowCase/BubbleShowCase.swift similarity index 93% rename from Sample/Pods/BubbleShowCase/ShowCase/ShowCase/ShowCase.swift rename to BubbleShowCase/BubbleShowCase/BubbleShowCase.swift index 6ff4f48..1fc8c3e 100644 --- a/Sample/Pods/BubbleShowCase/ShowCase/ShowCase/ShowCase.swift +++ b/BubbleShowCase/BubbleShowCase/BubbleShowCase.swift @@ -9,42 +9,42 @@ import UIKit /** -The delegate of ShowCase must adopt the ShowCaseDelegate protocol. Optional methods let the delegate know when the show case appears and dismisses and when some of the most common gestures are recognized by the target. +The delegate of BubbleShowCase must adopt the BubbleShowCaseDelegate protocol. Optional methods let the delegate know when the show case appears and dismisses and when some of the most common gestures are recognized by the target. */ -@objc public protocol ShowCaseDelegate: class { +@objc public protocol BubbleShowCaseDelegate: class { /// Tells the delegate the show case is going to appear into the screen - @objc optional func showCaseWillTransitionIntoScreen(_ showCase: ShowCase) + @objc optional func bubbleShowCaseWillTransitionIntoScreen(_ bubbleShowCase: BubbleShowCase) /// Tells the delegate appeared into the screen - @objc optional func showCaseDidTransitionIntoScreen(_ showCase: ShowCase) + @objc optional func bubbleShowCaseDidTransitionIntoScreen(_ bubbleShowCase: BubbleShowCase) /// Tells the delegate the show case is going to be removed from the screen - @objc optional func showCaseWillDismiss(_ showCase: ShowCase) + @objc optional func bubbleShowCaseWillDismiss(_ bubbleShowCase: BubbleShowCase) /// Tells the delegate the show case was removed from the screen - @objc optional func showCaseDidDismiss(_ showCase: ShowCase) + @objc optional func bubbleShowCaseDidDismiss(_ bubbleShowCase: BubbleShowCase) /// Tells the delegate the target was tapped - @objc optional func showCase(_ showCase: ShowCase, didTap target: UIView!, gestureRecognizer: UITapGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didTap target: UIView!, gestureRecognizer: UITapGestureRecognizer) /// Tells the delegate the target was double tapped - @objc optional func showCase(_ showCase: ShowCase, didDoubleTap target: UIView!, gestureRecognizer: UITapGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didDoubleTap target: UIView!, gestureRecognizer: UITapGestureRecognizer) /// Tells the delegate the target was swiped leftwards - @objc optional func showCase(_ showCase: ShowCase, didSwipeLeft target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didSwipeLeft target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) /// Tells the delegate the target was swiped rightwards - @objc optional func showCase(_ showCase: ShowCase, didSwipeRight target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didSwipeRight target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) /// Tells the delegate the target was swiped upwards - @objc optional func showCase(_ showCase: ShowCase, didSwipeUp target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didSwipeUp target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) /// Tells the delegate the target was swiped downwards - @objc optional func showCase(_ showCase: ShowCase, didSwipeDown target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didSwipeDown target: UIView!, gestureRecognizer: UISwipeGestureRecognizer) /// Tells the delegate the target was long pressed - @objc optional func showCase(_ showCase: ShowCase, didLongPress target: UIView!, gestureRecognizer: UILongPressGestureRecognizer) + @objc optional func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didLongPress target: UIView!, gestureRecognizer: UILongPressGestureRecognizer) } /** @@ -54,7 +54,7 @@ This so called show case obscurs the scene, pops up above any other view in the # Example # ```` ... -let showCase = ShowCase(target: myBarButton, label: "BarButtonShowCase") +let showCase = BubbleShowCaseShow(target: myBarButton, label: "BarButtonShowCase") showCase.titleText = "You know what?" showCase.descriptionText = "You can do amazing things if you tap on this navbar button" showCase.image = UIImage(named: "show-case-bar-button") @@ -65,7 +65,7 @@ showCase.show() ```` */ -public class ShowCase: UIView { +public class BubbleShowCase: UIView { /** It indicates the direction the show case should point to. There are 6 options: @@ -162,7 +162,7 @@ public class ShowCase: UIView { public var isCrossDismissable = true { didSet { cross?.isHidden = !isCrossDismissable } } /// The object that acts as the delegate of a Show Case. The delegate is not retained and is therefore qualified as *weak*. - public weak var delegate: ShowCaseDelegate? + public weak var delegate: BubbleShowCaseDelegate? /** Direction of the arrow the show case points to. There are 6 possible values. @@ -207,14 +207,14 @@ public class ShowCase: UIView { private var screenWindow: UIWindow { return UIApplication.shared.keyWindow! } /******************* ID ***********************/ - private(set) var label: String? + public private(set) var label: String? /***************** LAYERS *********************/ private var crossLayer: CAShapeLayer? private var arrowLayers: [CAShapeLayer]? /***************** CONCAT *********************/ - fileprivate var nextShowCase: ShowCase? + fileprivate var nextShowCase: BubbleShowCase? //MARK: Initializers @@ -334,7 +334,7 @@ public class ShowCase: UIView { //MARK: Public Methods /// Dismisses the show case out of the screen with an animation. - public func dimiss() { + public func dismiss() { animateDisappearance() } @@ -350,13 +350,13 @@ public class ShowCase: UIView { } /// Call this method to concat a show case. It will be automatically displayed after this is completed. - public func concat(showCase: ShowCase) { - self.nextShowCase = showCase + public func concat(bubbleShowCase: BubbleShowCase) { + self.nextShowCase = bubbleShowCase } /// Displays the show case after the one passed as argument has finished. - public func show(after showCase: ShowCase) { - showCase.nextShowCase = self + public func show(after bubbleShowCase: BubbleShowCase) { + bubbleShowCase.nextShowCase = self } //MARK: Override @@ -460,20 +460,20 @@ public class ShowCase: UIView { // Animates the appearance of both the show case and its subviews private func animateDisappearance() { - delegate?.showCaseWillDismiss?(self) + delegate?.bubbleShowCaseWillDismiss?(self) nextShowCase?.show() UIView.animate(withDuration: 0.4, animations: { [weak self] in self?.alpha = 0 }, completion: { [weak self] _ in guard let `self` = self else { return } - self.delegate?.showCaseDidDismiss?(self) + self.delegate?.bubbleShowCaseDidDismiss?(self) self.removeFromSuperview() }) } // Animates the removal of the show case out of the screen private func animateAppearance() { - delegate?.showCaseWillTransitionIntoScreen?(self) + delegate?.bubbleShowCaseWillTransitionIntoScreen?(self) alpha = 0 bubble.alpha = 0 screenshotContainer?.alpha = 0 @@ -490,7 +490,7 @@ public class ShowCase: UIView { self?.bubble.transform = .identity }, completion: { [weak self] _ in guard let `self` = self else { return } - self.delegate?.showCaseDidTransitionIntoScreen?(self) + self.delegate?.bubbleShowCaseDidTransitionIntoScreen?(self) UIView.animate(withDuration: 0.4, delay: 0, options: [.autoreverse, .repeat, .allowUserInteraction], animations: { [weak self] in self?.screenshotContainer?.transform = CGAffineTransform(scaleX: 1.05, y: 1.05) }, completion: nil) @@ -779,49 +779,49 @@ public class ShowCase: UIView { // Screenshot was tapped @objc private func targetDidTap(gestureRecognizer: UIGestureRecognizer) { guard let tapGestureRecognizer = gestureRecognizer as? UITapGestureRecognizer else { return } - delegate?.showCase?(self, didTap: target, gestureRecognizer: tapGestureRecognizer) + delegate?.bubbleShowCase?(self, didTap: target, gestureRecognizer: tapGestureRecognizer) } // Screenshot was double long pressed @objc private func targetDidLongPress(gestureRecognizer: UIGestureRecognizer) { guard let longPressGestureRecognizer = gestureRecognizer as? UILongPressGestureRecognizer else { return } guard longPressGestureRecognizer.state == .ended else { return } - delegate?.showCase?(self, didLongPress: target, gestureRecognizer: longPressGestureRecognizer) + delegate?.bubbleShowCase?(self, didLongPress: target, gestureRecognizer: longPressGestureRecognizer) } // Screenshot was double tapped @objc private func targetDidDoubleTap(gestureRecognizer: UIGestureRecognizer) { guard let tapGestureRecognizer = gestureRecognizer as? UITapGestureRecognizer else { return } - delegate?.showCase?(self, didDoubleTap: target, gestureRecognizer: tapGestureRecognizer) + delegate?.bubbleShowCase?(self, didDoubleTap: target, gestureRecognizer: tapGestureRecognizer) } // Screenshot was double swiped leftwards @objc private func targetDidSwipeLeft(gestureRecognizer: UIGestureRecognizer) { guard let swipeGestureRecognizer = gestureRecognizer as? UISwipeGestureRecognizer else { return } - delegate?.showCase?(self, didSwipeLeft: target, gestureRecognizer: swipeGestureRecognizer) + delegate?.bubbleShowCase?(self, didSwipeLeft: target, gestureRecognizer: swipeGestureRecognizer) } // Screenshot was double swiped rightwards @objc private func targetDidSwipeRight(gestureRecognizer: UIGestureRecognizer) { guard let swipeGestureRecognizer = gestureRecognizer as? UISwipeGestureRecognizer else { return } - delegate?.showCase?(self, didSwipeRight: target, gestureRecognizer: swipeGestureRecognizer) + delegate?.bubbleShowCase?(self, didSwipeRight: target, gestureRecognizer: swipeGestureRecognizer) } // Screenshot was double swiped downwards @objc private func targetDidSwipeDown(gestureRecognizer: UIGestureRecognizer) { guard let swipeGestureRecognizer = gestureRecognizer as? UISwipeGestureRecognizer else { return } - delegate?.showCase?(self, didSwipeDown: target, gestureRecognizer: swipeGestureRecognizer) + delegate?.bubbleShowCase?(self, didSwipeDown: target, gestureRecognizer: swipeGestureRecognizer) } // Screenshot was double swiped upwards @objc private func targetDidSwipeUp(gestureRecognizer: UIGestureRecognizer) { guard let swipeGestureRecognizer = gestureRecognizer as? UISwipeGestureRecognizer else { return } - delegate?.showCase?(self, didSwipeUp: target, gestureRecognizer: swipeGestureRecognizer) + delegate?.bubbleShowCase?(self, didSwipeUp: target, gestureRecognizer: swipeGestureRecognizer) } //MARK: Embed subviews - // Embeds the showCase in the application window + // Embeds the show case in the application window private func embedInSuperView() { self.translatesAutoresizingMaskIntoConstraints = false screenWindow.addSubview(self) diff --git a/ShowCase/ShowCase/BubbleShowCase.podspec b/BubbleShowCase/BubbleShowCase/BubbleShowCaseShowCase.podspec similarity index 100% rename from ShowCase/ShowCase/BubbleShowCase.podspec rename to BubbleShowCase/BubbleShowCase/BubbleShowCaseShowCase.podspec diff --git a/ShowCase/ShowCase/Info.plist b/BubbleShowCase/BubbleShowCase/Info.plist similarity index 100% rename from ShowCase/ShowCase/Info.plist rename to BubbleShowCase/BubbleShowCase/Info.plist diff --git a/ShowCase/ShowCase/ShowCase.h b/BubbleShowCase/BubbleShowCase/ShowCase.h similarity index 100% rename from ShowCase/ShowCase/ShowCase.h rename to BubbleShowCase/BubbleShowCase/ShowCase.h diff --git a/Sample/Podfile.lock b/Sample/Podfile.lock index edd8dcb..6ed8201 100644 --- a/Sample/Podfile.lock +++ b/Sample/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - BubbleShowCase (0.0.1) + - BubbleShowCase (0.0.2) DEPENDENCIES: - BubbleShowCase @@ -9,7 +9,7 @@ SPEC REPOS: - BubbleShowCase SPEC CHECKSUMS: - BubbleShowCase: 29c92e692b7b6ea1b54063efcbe1fa0157098436 + BubbleShowCase: e9ae06c545649764b81507fc916251a60cc9e070 PODFILE CHECKSUM: c9f2160adbf20d26d642865800eac30cde2a746c diff --git a/ShowCase/ShowCase/BubbleShowCase.swift b/Sample/Pods/BubbleShowCase/ShowCase/ShowCase/BubbleShowCase.swift similarity index 100% rename from ShowCase/ShowCase/BubbleShowCase.swift rename to Sample/Pods/BubbleShowCase/ShowCase/ShowCase/BubbleShowCase.swift diff --git a/Sample/Pods/Manifest.lock b/Sample/Pods/Manifest.lock index edd8dcb..6ed8201 100644 --- a/Sample/Pods/Manifest.lock +++ b/Sample/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - BubbleShowCase (0.0.1) + - BubbleShowCase (0.0.2) DEPENDENCIES: - BubbleShowCase @@ -9,7 +9,7 @@ SPEC REPOS: - BubbleShowCase SPEC CHECKSUMS: - BubbleShowCase: 29c92e692b7b6ea1b54063efcbe1fa0157098436 + BubbleShowCase: e9ae06c545649764b81507fc916251a60cc9e070 PODFILE CHECKSUM: c9f2160adbf20d26d642865800eac30cde2a746c diff --git a/Sample/Pods/Pods.xcodeproj/project.pbxproj b/Sample/Pods/Pods.xcodeproj/project.pbxproj index 97ba2fc..30bca08 100644 --- a/Sample/Pods/Pods.xcodeproj/project.pbxproj +++ b/Sample/Pods/Pods.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 338F0B4D49590C1476D5F92962475AA8 /* Pods-ShowCaseSample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C72446B27E280D9AC95E741F64F18424 /* Pods-ShowCaseSample-dummy.m */; }; - 4FC20C1EBB848818306E7C705A778830 /* BubbleShowCase-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DC5E6F0A80081EF43F05673F8DCE61F8 /* BubbleShowCase-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 615B114320A6888A665D1B7A2FAA40CD /* BubbleShowCase-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FC8E95BCCBABFEE769D6068B518E2D99 /* BubbleShowCase-dummy.m */; }; + 4FC20C1EBB848818306E7C705A778830 /* BubbleShowCase-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B81B02E9E02A81EB32C825E7A39CDA2 /* BubbleShowCase-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9A27E279EB33AB1308D2BAA3C5FAF7B7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; 9CC069756574A559954F1C8A11EF858B /* Pods-ShowCaseSample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 126898D2985B10CD2726D97AF4877915 /* Pods-ShowCaseSample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B1ADE415EB50F361C545901CEF77A17F /* ShowCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C719E0F5C1958D4F76B39FDFE874B92 /* ShowCase.swift */; }; CACDE44CB372F74D094FE9B028C1C91F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */; }; + DD2B508CDF54AA83300924FAFC983E0F /* BubbleShowCase-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D5798FD0440DF3372E4757E113D9CA71 /* BubbleShowCase-dummy.m */; }; + EC936BFBE98C7F4D3E80AD506310EEC3 /* BubbleShowCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8EFA878411C62AE141B27B851646009 /* BubbleShowCase.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -28,26 +28,26 @@ /* Begin PBXFileReference section */ 06CB474FD09D0642F587C10F8F1EDEC2 /* Pods-ShowCaseSample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ShowCaseSample-resources.sh"; sourceTree = ""; }; + 0B6234FA93B30D074323FEB910A4BA76 /* BubbleShowCase-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BubbleShowCase-prefix.pch"; sourceTree = ""; }; + 0C186F98A126D5ABD3B3740546B628C0 /* BubbleShowCase.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BubbleShowCase.xcconfig; sourceTree = ""; }; + 10D5D8B73F60D916E06350E87E790A33 /* BubbleShowCase.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = BubbleShowCase.modulemap; sourceTree = ""; }; 126898D2985B10CD2726D97AF4877915 /* Pods-ShowCaseSample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ShowCaseSample-umbrella.h"; sourceTree = ""; }; 1372A7A0726B83DC5ACDD6B44BA75919 /* Pods-ShowCaseSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ShowCaseSample.debug.xcconfig"; sourceTree = ""; }; - 41DDEE0C6750415C1CFFDC66C4E618E0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49E03F3A261F217373CA84A6B1C39367 /* Pods-ShowCaseSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ShowCaseSample.release.xcconfig"; sourceTree = ""; }; - 4CE65D5CF3454C45CA799A425E40C417 /* BubbleShowCase.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = BubbleShowCase.xcconfig; sourceTree = ""; }; - 52A96A16BF1568D37D5F7CF0B53C90FA /* BubbleShowCase-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BubbleShowCase-prefix.pch"; sourceTree = ""; }; + 547C7EE8EE965948C4A715ADA4556D2F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5A16F4CFC63FAC439D7A04994F579A03 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 6A4E2E67559DE2AF5BF37CBB20BA2E7C /* BubbleShowCase.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = BubbleShowCase.modulemap; sourceTree = ""; }; 787239B4E878DE0CFC11D5F59E37596B /* BubbleShowCase.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = BubbleShowCase.framework; path = BubbleShowCase.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8AC4471BAC5432FE6893FFA5ACCA2B38 /* Pods-ShowCaseSample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ShowCaseSample-acknowledgements.markdown"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9C719E0F5C1958D4F76B39FDFE874B92 /* ShowCase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShowCase.swift; path = ShowCase/ShowCase/ShowCase.swift; sourceTree = ""; }; + 9B81B02E9E02A81EB32C825E7A39CDA2 /* BubbleShowCase-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BubbleShowCase-umbrella.h"; sourceTree = ""; }; A3F70133F24D6C52660CD7751DC89378 /* Pods_ShowCaseSample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ShowCaseSample.framework; path = "Pods-ShowCaseSample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; B126BB976CAB85C61799E299D4A54AE5 /* Pods-ShowCaseSample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ShowCaseSample-frameworks.sh"; sourceTree = ""; }; C0C8E5B1A4047A16109554A7A511765B /* Pods-ShowCaseSample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ShowCaseSample-acknowledgements.plist"; sourceTree = ""; }; C72446B27E280D9AC95E741F64F18424 /* Pods-ShowCaseSample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ShowCaseSample-dummy.m"; sourceTree = ""; }; C9CBEA23C25DDFCC02284DF431343245 /* Pods-ShowCaseSample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ShowCaseSample.modulemap"; sourceTree = ""; }; - DC5E6F0A80081EF43F05673F8DCE61F8 /* BubbleShowCase-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "BubbleShowCase-umbrella.h"; sourceTree = ""; }; + D5798FD0440DF3372E4757E113D9CA71 /* BubbleShowCase-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BubbleShowCase-dummy.m"; sourceTree = ""; }; + D8EFA878411C62AE141B27B851646009 /* BubbleShowCase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BubbleShowCase.swift; path = ShowCase/ShowCase/BubbleShowCase.swift; sourceTree = ""; }; DCFD2A13ABA3844E66BE2226DFFB9177 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FC8E95BCCBABFEE769D6068B518E2D99 /* BubbleShowCase-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "BubbleShowCase-dummy.m"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -70,6 +70,20 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3ABDEACF8CF4AE69CCF25CF310C6C490 /* Support Files */ = { + isa = PBXGroup; + children = ( + 10D5D8B73F60D916E06350E87E790A33 /* BubbleShowCase.modulemap */, + 0C186F98A126D5ABD3B3740546B628C0 /* BubbleShowCase.xcconfig */, + D5798FD0440DF3372E4757E113D9CA71 /* BubbleShowCase-dummy.m */, + 0B6234FA93B30D074323FEB910A4BA76 /* BubbleShowCase-prefix.pch */, + 9B81B02E9E02A81EB32C825E7A39CDA2 /* BubbleShowCase-umbrella.h */, + 547C7EE8EE965948C4A715ADA4556D2F /* Info.plist */, + ); + name = "Support Files"; + path = "../Target Support Files/BubbleShowCase"; + sourceTree = ""; + }; 3ABF5818CD98C5BB8A26B2FF9FBAE2B6 /* Targets Support Files */ = { isa = PBXGroup; children = ( @@ -97,6 +111,16 @@ ); sourceTree = ""; }; + 983298DE5C88E3086796A0B07E182B13 /* BubbleShowCase */ = { + isa = PBXGroup; + children = ( + D8EFA878411C62AE141B27B851646009 /* BubbleShowCase.swift */, + 3ABDEACF8CF4AE69CCF25CF310C6C490 /* Support Files */, + ); + name = BubbleShowCase; + path = BubbleShowCase; + sourceTree = ""; + }; 9E6350F4FA3A1B2B88EDCCFFE2DF938F /* Pods-ShowCaseSample */ = { isa = PBXGroup; children = ( @@ -123,20 +147,6 @@ name = Frameworks; sourceTree = ""; }; - C53650D6074D6EEFFB8DB67136AEBAA8 /* Support Files */ = { - isa = PBXGroup; - children = ( - 6A4E2E67559DE2AF5BF37CBB20BA2E7C /* BubbleShowCase.modulemap */, - 4CE65D5CF3454C45CA799A425E40C417 /* BubbleShowCase.xcconfig */, - FC8E95BCCBABFEE769D6068B518E2D99 /* BubbleShowCase-dummy.m */, - 52A96A16BF1568D37D5F7CF0B53C90FA /* BubbleShowCase-prefix.pch */, - DC5E6F0A80081EF43F05673F8DCE61F8 /* BubbleShowCase-umbrella.h */, - 41DDEE0C6750415C1CFFDC66C4E618E0 /* Info.plist */, - ); - name = "Support Files"; - path = "../Target Support Files/BubbleShowCase"; - sourceTree = ""; - }; F511823538FD00C048696D2A7A6A7732 /* Products */ = { isa = PBXGroup; children = ( @@ -149,21 +159,11 @@ F52F1084FD78FE1B8C8D5A78C1E458F5 /* Pods */ = { isa = PBXGroup; children = ( - FF90FDD03366CE4496E08A2C6B01C27E /* BubbleShowCase */, + 983298DE5C88E3086796A0B07E182B13 /* BubbleShowCase */, ); name = Pods; sourceTree = ""; }; - FF90FDD03366CE4496E08A2C6B01C27E /* BubbleShowCase */ = { - isa = PBXGroup; - children = ( - 9C719E0F5C1958D4F76B39FDFE874B92 /* ShowCase.swift */, - C53650D6074D6EEFFB8DB67136AEBAA8 /* Support Files */, - ); - name = BubbleShowCase; - path = BubbleShowCase; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -208,7 +208,7 @@ isa = PBXNativeTarget; buildConfigurationList = 796A398B6F7CFE13542AFCC16D921542 /* Build configuration list for PBXNativeTarget "BubbleShowCase" */; buildPhases = ( - CF6162F544D00158F5A3539E456A057D /* Sources */, + 2B9501E360CE653F14794AF731776444 /* Sources */, 057753F96DFE102039E82A3F98DF729F /* Frameworks */, 8B33B4BB7A8743CE4631E54A26440B94 /* Headers */, ); @@ -249,12 +249,12 @@ /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - CF6162F544D00158F5A3539E456A057D /* Sources */ = { + 2B9501E360CE653F14794AF731776444 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 615B114320A6888A665D1B7A2FAA40CD /* BubbleShowCase-dummy.m in Sources */, - B1ADE415EB50F361C545901CEF77A17F /* ShowCase.swift in Sources */, + DD2B508CDF54AA83300924FAFC983E0F /* BubbleShowCase-dummy.m in Sources */, + EC936BFBE98C7F4D3E80AD506310EEC3 /* BubbleShowCase.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -343,7 +343,7 @@ }; 233FA04E435CF9FFE948E86467C41E27 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4CE65D5CF3454C45CA799A425E40C417 /* BubbleShowCase.xcconfig */; + baseConfigurationReference = 0C186F98A126D5ABD3B3740546B628C0 /* BubbleShowCase.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -457,7 +457,7 @@ }; F0A9EC7792ED6CA0572AFAC8EB6F3F7D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4CE65D5CF3454C45CA799A425E40C417 /* BubbleShowCase.xcconfig */; + baseConfigurationReference = 0C186F98A126D5ABD3B3740546B628C0 /* BubbleShowCase.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; diff --git a/Sample/Pods/Target Support Files/BubbleShowCase/Info.plist b/Sample/Pods/Target Support Files/BubbleShowCase/Info.plist index cba2585..38ad71a 100644 --- a/Sample/Pods/Target Support Files/BubbleShowCase/Info.plist +++ b/Sample/Pods/Target Support Files/BubbleShowCase/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.0.1 + 0.0.2 CFBundleSignature ???? CFBundleVersion diff --git a/Sample/ShowCaseSample/ShowCaseViewController.swift b/Sample/ShowCaseSample/ShowCaseViewController.swift index b816a54..8719a7b 100644 --- a/Sample/ShowCaseSample/ShowCaseViewController.swift +++ b/Sample/ShowCaseSample/ShowCaseViewController.swift @@ -55,7 +55,7 @@ class ShowCaseViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - let showCaseOnView = ShowCase(target: startDemoButton, arrowDirection: .down, label: "startDemoButton") + let showCaseOnView = BubbleShowCase(target: startDemoButton, arrowDirection: .down, label: "startDemoButton") showCaseOnView.titleText = "Tap here to close it" showCaseOnView.descriptionText = "You will start the demo" showCaseOnView.arrowDirection = .right @@ -68,32 +68,32 @@ class ShowCaseViewController: UIViewController { @IBAction func startDemoDidTap(_ sender: UIButton) { - let showCaseOnTabBar = ShowCase(tabBar: tabBarController!.tabBar, index: 8, label: "tabBar") + let showCaseOnTabBar = BubbleShowCase(tabBar: tabBarController!.tabBar, index: 8, label: "tabBar") showCaseOnTabBar.titleText = "In a tabBar!" showCaseOnTabBar.descriptionText = "It doesn't matter wether the item is hidden" showCaseOnTabBar.color = UIColor(red: 196.0/255.0, green: 249.0/255.0, blue: 212.0/255.0, alpha: 1.0) showCaseOnTabBar.textColor = UIColor.darkGray showCaseOnTabBar.delegate = self - let showCaseOnNavBar = ShowCase(target: navigationItem.rightBarButtonItem!, label: "barButtonItem")! + let showCaseOnNavBar = BubbleShowCase(target: navigationItem.rightBarButtonItem!, label: "barButtonItem")! showCaseOnNavBar.titleText = "Watch out!" showCaseOnNavBar.descriptionText = "Bar buttons must be custom so that the show case works" - showCaseOnTabBar.concat(showCase: showCaseOnNavBar) + showCaseOnTabBar.concat(bubbleShowCase: showCaseOnNavBar) showCaseOnNavBar.color = UIColor(red: 255.0/255.0, green: 26.0/255.0, blue: 114.0/255.0, alpha: 1.0) showCaseOnNavBar.shadowColor = UIColor.blue showCaseOnNavBar.textColor = UIColor.white - let showCaseOnRootView = ShowCase(target: view, arrowDirection: .upAndDown, label: "rootView") + let showCaseOnRootView = BubbleShowCase(target: view, arrowDirection: .upAndDown, label: "rootView") showCaseOnRootView.titleText = "Lots of directions" showCaseOnRootView.delegate = self showCaseOnRootView.image = UIImage(named: "show-case-swipe") showCaseOnRootView.descriptionText = "-Double directions are placed in the center of the screen \n-You can add images too \n-Show a cross to dismiss it or choose to force the user to react to the target" - showCaseOnNavBar.concat(showCase: showCaseOnRootView) + showCaseOnNavBar.concat(bubbleShowCase: showCaseOnRootView) DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(100)) { [weak self] in guard let `self` = self else { return } if let cell = self.tableView.cellForRow(at: IndexPath(row: 4, section: 0)) { - let showCaseOnCell = ShowCase(cell: cell, target: nil, arrowDirection: .down, label: "cellIndex4") + let showCaseOnCell = BubbleShowCase(cell: cell, target: nil, arrowDirection: .down, label: "cellIndex4") showCaseOnCell.titleText = "Hey, what about me?" showCaseOnCell.descriptionText = "ShowCase works also for both UITableView and UICollectionView" showCaseOnCell.delegate = self @@ -110,17 +110,18 @@ class ShowCaseViewController: UIViewController { } -extension ShowCaseViewController: ShowCaseDelegate { +extension ShowCaseViewController: BubbleShowCaseDelegate { - func showCase(_ showCase: ShowCase, didTap target: UIView!, gestureRecognizer: UITapGestureRecognizer) { - if showCase.label == "startDemoButton" { - showSimpleAlert(title: "Hey!", message: "You can react to certain gestures. See ShowCaseDelegate for more information.") { [weak self] in - guard let `self` = self else { return } - self.startDemoDidTap(self.startDemoButton) - } - - showCase.dimiss() + func bubbleShowCase(_ bubbleShowCase: BubbleShowCase, didTap target: UIView!, gestureRecognizer: UITapGestureRecognizer) { + guard let showCaseLabel = bubbleShowCase.label else { return } + guard showCaseLabel == "startDemoButton" else { return } + + showSimpleAlert(title: "Hey!", message: "You can react to certain gestures. See ShowCaseDelegate for more information.") { [weak self] in + guard let `self` = self else { return } + self.startDemoDidTap(self.startDemoButton) } + + bubbleShowCase.dimiss() } } @@ -153,7 +154,7 @@ extension ShowCaseViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { if indexPath.row == 12, !isCellShowCaseShown { - let showCaseOnCell = ShowCase(cell: cell, target: nil, arrowDirection: .down, label: "cellIndex12") + let showCaseOnCell = BubbleShowCase(cell: cell, target: nil, arrowDirection: .down, label: "cellIndex12") showCaseOnCell.titleText = "Am I not in the screen?" showCaseOnCell.descriptionText = "I'll stop the scroll and make sure the cell displays" showCaseOnCell.delegate = self