Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
BreastFeedingAI-Demo-iOS
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
BreastFeedingAI-Demo-iOS
Commits
c9301189
Commit
c9301189
authored
Jun 08, 2022
by
jzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
dda6f732
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
Main.storyboard
BreastFeedingDemo/Base.lproj/Main.storyboard
+7
-7
ViewController.swift
BreastFeedingDemo/ViewController.swift
+5
-5
No files found.
BreastFeedingDemo/Base.lproj/Main.storyboard
View file @
c9301189
...
...
@@ -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=
"
baseForeground
Color"
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=
"
title
Color"
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>
...
...
BreastFeedingDemo/ViewController.swift
View file @
c9301189
...
...
@@ -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
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment