diff --git a/mopro-ios/MoproKit/Example/MoproKit/KeccakSetupViewController.swift b/mopro-ios/MoproKit/Example/MoproKit/KeccakSetupViewController.swift index e8bcaf62..2ae685e1 100644 --- a/mopro-ios/MoproKit/Example/MoproKit/KeccakSetupViewController.swift +++ b/mopro-ios/MoproKit/Example/MoproKit/KeccakSetupViewController.swift @@ -23,11 +23,22 @@ class KeccakSetupViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .white + + // Set title + let title = UILabel() + title.text = "Keccak256 (setup)" + title.textColor = .white + title.textAlignment = .center + navigationItem.titleView = title + navigationController?.navigationBar.isHidden = false navigationController?.navigationBar.prefersLargeTitles = true - navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black] - navigationController?.navigationBar.barTintColor = UIColor.white // or any other contrasting color - self.title = "Keccak256 (setup)" + + // view.backgroundColor = .white + // navigationController?.navigationBar.prefersLargeTitles = true + // navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black] + // navigationController?.navigationBar.barTintColor = UIColor.white // or any other contrasting color + // self.title = "Keccak256 (setup)" + setupUI() } @@ -38,7 +49,7 @@ class KeccakSetupViewController: UIViewController { textView.isEditable = false - self.title = "Keccak256 (setup)" + //self.title = "Keccak256 (setup)" //view.backgroundColor = .black // Setup actions for buttons diff --git a/mopro-ios/MoproKit/Example/MoproKit/KeccakZkeyViewController.swift b/mopro-ios/MoproKit/Example/MoproKit/KeccakZkeyViewController.swift index af00a61f..349ce6ef 100644 --- a/mopro-ios/MoproKit/Example/MoproKit/KeccakZkeyViewController.swift +++ b/mopro-ios/MoproKit/Example/MoproKit/KeccakZkeyViewController.swift @@ -23,10 +23,16 @@ class KeccakZkeyViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .white + // Set title + let title = UILabel() + title.text = "Keccak256 (Zkey)" + title.textColor = .white + title.textAlignment = .center + navigationItem.titleView = title + navigationController?.navigationBar.isHidden = false navigationController?.navigationBar.prefersLargeTitles = true - self.title = "Keccak256 (zkey)" + setupUI() } @@ -41,8 +47,6 @@ class KeccakZkeyViewController: UIViewController { verifyButton.isEnabled = false textView.isEditable = false - self.title = "Keccak256 (zkey)" - // Setup actions for buttons initButton.addTarget(self, action: #selector(runInitAction), for: .touchUpInside) proveButton.addTarget(self, action: #selector(runProveAction), for: .touchUpInside) diff --git a/mopro-ios/MoproKit/Example/MoproKit/RSAViewController.swift b/mopro-ios/MoproKit/Example/MoproKit/RSAViewController.swift index 30e900c9..d0217206 100644 --- a/mopro-ios/MoproKit/Example/MoproKit/RSAViewController.swift +++ b/mopro-ios/MoproKit/Example/MoproKit/RSAViewController.swift @@ -23,9 +23,16 @@ class RSAViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .white + // Set title + let title = UILabel() + title.text = "RSA (Zkey)" + title.textColor = .white + title.textAlignment = .center + navigationItem.titleView = title + navigationController?.navigationBar.isHidden = false navigationController?.navigationBar.prefersLargeTitles = true + setupUI() } @@ -40,8 +47,6 @@ class RSAViewController: UIViewController { verifyButton.isEnabled = false textView.isEditable = false - self.title = "RSA (zkey)" - // Setup actions for buttons initButton.addTarget(self, action: #selector(runInitAction), for: .touchUpInside) proveButton.addTarget(self, action: #selector(runProveAction), for: .touchUpInside) diff --git a/mopro-ios/MoproKit/Example/MoproKit/ViewController.swift b/mopro-ios/MoproKit/Example/MoproKit/ViewController.swift index 40d12a6e..c613ca94 100644 --- a/mopro-ios/MoproKit/Example/MoproKit/ViewController.swift +++ b/mopro-ios/MoproKit/Example/MoproKit/ViewController.swift @@ -19,12 +19,17 @@ class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - // Maybe black nice, need more style tweaks though - view.backgroundColor = .white - - // TODO: Not showing up for some reason + // TODO: Improve style + + // Set title + let title = UILabel() + title.text = "Mopro Examples" + title.textColor = .white + title.textAlignment = .center + navigationItem.titleView = title + navigationController?.navigationBar.isHidden = false navigationController?.navigationBar.prefersLargeTitles = true - self.title = "Mopro Examples" + setupMainUI() } @@ -38,6 +43,10 @@ class ViewController: UIViewController { rsaButton.setTitle("RSA", for: .normal) rsaButton.addTarget(self, action: #selector(openRSA), for: .touchUpInside) +// self.title = "Mopro Examples" +// navigationController?.navigationBar.prefersLargeTitles = true + + let stackView = UIStackView(arrangedSubviews: [keccakSetupButton, keccakZkeyButton, rsaButton]) stackView.axis = .vertical stackView.spacing = 20