diff --git a/BreastFeedingDemo/Base.lproj/Main.storyboard b/BreastFeedingDemo/Base.lproj/Main.storyboard index f18983c763e945a17e6b4853053d062e6fe94886..22105cd48ef434667c8e7d1e384413786c260adc 100644 --- a/BreastFeedingDemo/Base.lproj/Main.storyboard +++ b/BreastFeedingDemo/Base.lproj/Main.storyboard @@ -95,16 +95,16 @@ <rect key="frame" x="0.0" y="631" width="414" height="231"/> <subviews> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eST-58-iE6"> - <rect key="frame" x="101" y="96.5" width="212" height="38"/> + <rect key="frame" x="67.5" y="90.5" width="279" height="50"/> <constraints> <constraint firstAttribute="width" secondItem="eST-58-iE6" secondAttribute="height" multiplier="5.58974" id="5Ll-2F-jZ5"/> - <constraint firstAttribute="height" constant="38" id="VCb-UE-ur6"/> + <constraint firstAttribute="height" constant="50" id="VCb-UE-ur6"/> </constraints> - <state key="normal" title="Button"/> - <buttonConfiguration key="configuration" style="plain" title="Empezar ahora"> - <backgroundConfiguration key="background" image="light-btn-bg"/> - <color key="baseForegroundColor" red="0.9459709181" green="1" blue="0.97093926880000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> - </buttonConfiguration> + <fontDescription key="fontDescription" type="system" weight="heavy" pointSize="20"/> + <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/> + <state key="normal" title="Commencez maintenant" backgroundImage="light-btn-bg"> + <color key="titleColor" red="0.9459709181" green="1" blue="0.97093926880000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> + </state> <connections> <action selector="tapStart:" destination="BYZ-38-t0r" eventType="touchUpInside" id="bzd-Xi-4RV"/> </connections> diff --git a/BreastFeedingDemo/ViewController.swift b/BreastFeedingDemo/ViewController.swift index 3235f6143c33f3f22285e86d612d908a7687bc8c..2dbd292a0aa48c8d4c462d5ea0ca1947834446e3 100644 --- a/BreastFeedingDemo/ViewController.swift +++ b/BreastFeedingDemo/ViewController.swift @@ -7,7 +7,6 @@ import AVFoundation import Flutter -import permission_handler_apple import UIKit class ViewController: UIViewController { @@ -50,6 +49,7 @@ class ViewController: UIViewController { result(strongSelf.vm.flutterArguments) case "teachingEnd": strongSelf.presentedViewController?.dismiss(animated: true) + strongSelf.methodChannel?.invokeMethod("dispose", arguments: nil) // ["totalDuration": 3, "reasonText": Concern about my personal privacy, "status": incomplete, "incompleteReasonCode": 2] let argument: [String: Any] = try! JSONSerialization.jsonObject(with: (call.arguments as! String).data(using: .utf8)!) as! [String: Any] let totalDuration: Int = argument["totalDuration"] as! Int @@ -57,7 +57,7 @@ class ViewController: UIViewController { let status: String = argument["status"] as! String let incompleteReasonCode: Int = argument["incompleteReasonCode"] as! Int if status == "incomplete" { - strongSelf.showError(reasonText) +// strongSelf.showError(reasonText) } else if status == "complete" { strongSelf.toCompleteVC() } @@ -90,9 +90,9 @@ class ViewController: UIViewController { @IBAction func tapStart(_ sender: Any) { if let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine { - let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil) - flutterViewController.modalPresentationStyle = .overFullScreen - present(flutterViewController, animated: true) + let scanVC = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil) + scanVC.modalPresentationStyle = .overFullScreen + present(scanVC, animated: true) } }