From 1d8f3325ebe059bb25cab664712a478a7b233dd6 Mon Sep 17 00:00:00 2001 From: Quang Nguyen Date: Tue, 29 Oct 2019 14:19:09 +0900 Subject: [PATCH] Update the sample codes --- .../ViewController.swift | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Sample/MaterialShowcaseSample/ViewController.swift b/Sample/MaterialShowcaseSample/ViewController.swift index 62f1f9d..a77d1e3 100644 --- a/Sample/MaterialShowcaseSample/ViewController.swift +++ b/Sample/MaterialShowcaseSample/ViewController.swift @@ -22,20 +22,13 @@ class ViewController: UIViewController { // Mock data for table view let animals = ["Dolphin", "Penguin", "Panda", "Neko", "Inu"] + override func viewDidLoad() { super.viewDidLoad() tableView.dataSource = self - } override func viewDidAppear(_ animated: Bool) { - let showcase3 = MaterialShowcase() - showcase3.setTargetView(tableView: self.tableView, section: 0, row: 2) - showcase3.primaryText = "Action 3" - showcase3.secondaryText = "Click here to go into details" - showcase3.isTapRecognizerForTargetView = false - - let showcase1 = MaterialShowcase() showcase1.setTargetView(view: button) showcase1.primaryText = "Action 1" @@ -44,17 +37,21 @@ class ViewController: UIViewController { showcase1.backgroundPromptColor = UIColor.blue showcase1.isTapRecognizerForTargetView = true - let showcase2 = MaterialShowcase() showcase2.setTargetView(barButtonItem: searchItem) showcase2.primaryText = "Action 1.1" showcase2.secondaryText = "Click here to go into details" showcase2.isTapRecognizerForTargetView = true + let showcase3 = MaterialShowcase() + showcase3.setTargetView(tableView: self.tableView, section: 0, row: 2) + showcase3.primaryText = "Action 3" + showcase3.secondaryText = "Click here to go into details" + showcase3.isTapRecognizerForTargetView = false - showcase3.delegate = self - showcase2.delegate = self showcase1.delegate = self + showcase2.delegate = self + showcase3.delegate = self sequence.temp(showcase1).temp(showcase2).temp(showcase3).setKey(key: "eve").start() }