From 400840049937603ee6b1cc55a4e5f23d33c639e0 Mon Sep 17 00:00:00 2001 From: onevcat Date: Tue, 17 Dec 2024 16:20:58 +0900 Subject: [PATCH] Add parameter setting to sample app --- .../Login/LoginSettingsViewController.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/LineSDKSample/LineSDKSample/Login/LoginSettingsViewController.swift b/LineSDKSample/LineSDKSample/Login/LoginSettingsViewController.swift index 7f988f5e..c089987f 100644 --- a/LineSDKSample/LineSDKSample/Login/LoginSettingsViewController.swift +++ b/LineSDKSample/LineSDKSample/Login/LoginSettingsViewController.swift @@ -88,6 +88,20 @@ class LoginSettingsViewController: UITableViewController { case .none: p.botPromptStyle = .aggressive } } + ), + ParameterItem( + title: "Initial Auth Method", + text: { p in + switch p.initialWebAuthenticationMethod { + case .email: return "Email" + case .qrCode: return "QR Code" + } + }, action: { p in + switch p.initialWebAuthenticationMethod { + case .email: p.initialWebAuthenticationMethod = .qrCode + case .qrCode: p.initialWebAuthenticationMethod = .email + } + } ) ] @@ -137,6 +151,7 @@ class LoginSettingsViewController: UITableViewController { let p = parameters[indexPath.row] cell.textLabel?.text = p.title cell.detailTextLabel?.text = p.text(loginSettings.parameters) + cell.accessoryType = .none } return cell