Skip to content

Commit

Permalink
Added info button on settings screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mshamash committed Jul 17, 2021
1 parent 98651d9 commit be1ea43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OnePetri/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,13 @@
<constraint firstItem="vzH-xO-4hN" firstAttribute="top" secondItem="wRP-UL-Q7D" secondAttribute="top" constant="25" id="wVj-8g-hgZ"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Settings" id="lWg-lj-RQG"/>
<navigationItem key="navigationItem" title="Settings" id="lWg-lj-RQG">
<barButtonItem key="rightBarButtonItem" title="Item" image="info.circle" catalog="system" id="rtx-ib-ift">
<connections>
<action selector="didTapInfo:" destination="56S-ha-ftv" id="Imi-dE-ZIu"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
<outlet property="appVersionLabel" destination="IhB-nG-6ey" id="cDy-Vo-RuG"/>
Expand Down Expand Up @@ -940,6 +946,7 @@
<image name="camera.fill" catalog="system" width="128" height="94"/>
<image name="envelope.fill" catalog="system" width="128" height="93"/>
<image name="gearshape" catalog="system" width="128" height="121"/>
<image name="info.circle" catalog="system" width="128" height="121"/>
<image name="logo" width="864" height="879"/>
<image name="photo.on.rectangle.angled" catalog="system" width="128" height="101"/>
<image name="questionmark.circle" catalog="system" width="128" height="121"/>
Expand Down
7 changes: 7 additions & 0 deletions OnePetri/Controllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import SafariServices

class SettingsViewController: UIViewController {
@IBOutlet weak var petriConfTextField: UITextField!
Expand Down Expand Up @@ -51,6 +52,12 @@ class SettingsViewController: UIViewController {
@IBAction func didTapContribute(_ sender: UIButton) {
self.sendMail(imageMail: false)
}

@IBAction func didTapInfo(_ sender: UIBarButtonItem) {
let svc = SFSafariViewController(url: URL(string:"https://onepetri.ai/thresholds/")!)
svc.dismissButtonStyle = .close
self.present(svc, animated: true, completion: nil)
}

}

Expand Down

0 comments on commit be1ea43

Please sign in to comment.