From 5399f2be480be8c51fd346e59cedde236d6adc23 Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Tue, 14 Feb 2017 19:19:47 +0800 Subject: [PATCH] change positions of switch and detailed buttion --- pass/Controllers/GeneralSettingsTableViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pass/Controllers/GeneralSettingsTableViewController.swift b/pass/Controllers/GeneralSettingsTableViewController.swift index dfac9bb..098bfe9 100644 --- a/pass/Controllers/GeneralSettingsTableViewController.swift +++ b/pass/Controllers/GeneralSettingsTableViewController.swift @@ -32,8 +32,8 @@ class GeneralSettingsTableViewController: BasicStaticTableViewController { hideUnknownSwitch.onTintColor = UIColor(displayP3Red: 0, green: 122.0/255, blue: 1, alpha: 1) hideUnknownSwitch.sizeToFit() let detailButton = UIButton(type: .detailDisclosure) - hideUnknownSwitch.frame = CGRect(x: 0, y: 0, width: hideUnknownSwitch.bounds.width, height: hideUnknownSwitch.bounds.height) - detailButton.frame = CGRect(x: hideUnknownSwitch.bounds.width+10, y: 5, width: detailButton.bounds.width, height: detailButton.bounds.height) + hideUnknownSwitch.frame = CGRect(x: detailButton.bounds.width+10, y: 0, width: hideUnknownSwitch.bounds.width, height: hideUnknownSwitch.bounds.height) + detailButton.frame = CGRect(x: 0, y: 5, width: detailButton.bounds.width, height: detailButton.bounds.height) detailButton.addTarget(self, action: #selector(GeneralSettingsTableViewController.tapHideUnknownSwitchDetailButton(_:)), for: UIControlEvents.touchDown) let accessoryView = UIView(frame: CGRect(x: 0, y: 0, width: detailButton.bounds.width + hideUnknownSwitch.bounds.width+10, height: hideUnknownSwitch.bounds.height)) accessoryView.addSubview(detailButton)