Skip to content

Commit 252d834

Browse files
baquerchashmeetsingh
authored andcommitted
Showcase in Chat VC (#554)
1 parent 2025513 commit 252d834

File tree

6 files changed

+38
-1
lines changed

6 files changed

+38
-1
lines changed

Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ target 'Susi' do
2626
pod 'Localize-Swift'
2727
pod 'paper-onboarding'
2828
pod 'FTPopOverMenu_Swift', '~> 0.1.3'
29+
pod 'CTShowcase', '~> 2.4'
2930
pod 'SwiftKeychainWrapper'
3031
shared_pods
3132
end

Podfile.lock

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
PODS:
22
- Alamofire (4.7.2)
33
- BouncyLayout (2.1.0)
4+
- CTShowcase (2.4.0)
45
- Fakery (3.3.0)
56
- FTPopOverMenu_Swift (0.1.3)
67
- Ji (2.1.0):
@@ -38,6 +39,7 @@ PODS:
3839
DEPENDENCIES:
3940
- Alamofire (~> 4.7)
4041
- BouncyLayout
42+
- CTShowcase (~> 2.4)
4143
- Fakery (~> 3.3.0)
4244
- FTPopOverMenu_Swift (~> 0.1.3)
4345
- Kingfisher (~> 4.10.0)
@@ -59,6 +61,7 @@ SPEC REPOS:
5961
https://github.com/cocoapods/specs.git:
6062
- Alamofire
6163
- BouncyLayout
64+
- CTShowcase
6265
- Fakery
6366
- FTPopOverMenu_Swift
6467
- Ji
@@ -100,6 +103,7 @@ CHECKOUT OPTIONS:
100103
SPEC CHECKSUMS:
101104
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
102105
BouncyLayout: a7955879861375cc4e88bb64d42bcf622cd2694c
106+
CTShowcase: d6a7933f0724dadc12399b4d6d4815b419f1eb65
103107
Fakery: 3aae11a87721c807c18c6456500d088c1230d3e5
104108
FTPopOverMenu_Swift: f67e0af3935485c1cbcc44b5c92ed530ee32d21d
105109
Ji: 21946da4e13425485ddd424edfaeeced0d80ad28
@@ -119,6 +123,7 @@ SPEC CHECKSUMS:
119123
SwiftValidators: 660ce9ef3f0358c25c3a6154f7edc02c7d4a0578
120124
Toast-Swift: 594b5c5e5129f15438e410207e43287f027b3c00
121125

122-
PODFILE CHECKSUM: 1b10f58f7c4b4062888e85a85ba1f8e8afe9ad20
126+
PODFILE CHECKSUM: 9b8f14b1a46ec3d802c3eb0dbd813391f49a6f98
127+
123128

124129
COCOAPODS: 1.5.3

Susi.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@
896896
"${SRCROOT}/Pods/Target Support Files/Pods-Susi/Pods-Susi-frameworks.sh",
897897
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
898898
"${BUILT_PRODUCTS_DIR}/BouncyLayout/BouncyLayout.framework",
899+
"${BUILT_PRODUCTS_DIR}/CTShowcase/CTShowcase.framework",
899900
"${BUILT_PRODUCTS_DIR}/FTPopOverMenu_Swift/FTPopOverMenu_Swift.framework",
900901
"${BUILT_PRODUCTS_DIR}/Fakery/Fakery.framework",
901902
"${BUILT_PRODUCTS_DIR}/Ji/Ji.framework",
@@ -919,6 +920,7 @@
919920
outputPaths = (
920921
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
921922
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/BouncyLayout.framework",
923+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CTShowcase.framework",
922924
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FTPopOverMenu_Swift.framework",
923925
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Fakery.framework",
924926
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Ji.framework",

Susi/Controllers/ChatViewController/ChatVCMethods.swift

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import CoreLocation
1111
import AVFoundation
1212
import RealmSwift
1313
import Material
14+
import CTShowcase
1415

1516
protocol ChatViewControllerProtocol: class {
1617
func searchWith(text: String?)
@@ -374,6 +375,23 @@ extension ChatViewController {
374375
collectionView?.reloadData()
375376
scrollToLast()
376377
}
378+
379+
// Showcase configurations
380+
func showCaseConfig() {
381+
let skillShowcase = CTShowcaseView(title: ControllerConstants.showCase.skillButtonTitle, message: ControllerConstants.showCase.skillButtonMessage, key: ControllerConstants.showCase.skillButtonKey) {
382+
}
383+
let susiShowcase = CTShowcaseView(title: ControllerConstants.showCase.susiButtonTitle, message: ControllerConstants.showCase.susiButtonMessage, key: ControllerConstants.showCase.susiButtonKey) {
384+
}
385+
let highlighter = CTDynamicGlowHighlighter()
386+
highlighter.highlightColor = UIColor.blue
387+
highlighter.highlightType = .circle
388+
skillShowcase.highlighter = highlighter
389+
susiShowcase.highlighter = highlighter
390+
skillShowcase.setup(for:self.susiSkillListingButton, offset: CGPoint.zero, margin: 3)
391+
susiShowcase.setup(for:self.sendButton, offset: CGPoint.zero, margin: 3)
392+
skillShowcase.show()
393+
susiShowcase.show()
394+
}
377395

378396
}
379397

Susi/Controllers/ChatViewController/ChatViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ class ChatViewController: UICollectionViewController {
184184
} catch {
185185
print(error)
186186
}
187+
showCaseConfig()
187188
}
188189

189190
@objc func internetConnection(notification: NSNotification) {

Susi/Helpers/ControllerConstants.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,19 @@ class ControllerConstants {
291291
static let confirm = "Confirm"
292292
}
293293

294+
struct showCase {
295+
static let skillButtonTitle = "Susi Skill Button"
296+
static let skillButtonMessage = "Click here for Susi Skills"
297+
static let skillButtonKey = "displayed"
298+
static let susiButtonTitle = "Susi Button"
299+
static let susiButtonMessage = "Click here to enable Susi"
300+
static let susiButtonKey = "displayed1"
301+
}
302+
294303
struct KeyChainKey {
295304
static let userEmail = "userEmail"
296305
static let userPassword = "userPassword"
306+
297307
}
298308

299309
struct BookmarkSkill {

0 commit comments

Comments
 (0)