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
162d0009
Commit
162d0009
authored
Jun 05, 2022
by
jzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bbc6be6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
ViewController.swift
BreastFeedingDemo/ViewController.swift
+10
-11
No files found.
BreastFeedingDemo/ViewController.swift
View file @
162d0009
...
...
@@ -16,7 +16,6 @@ class ViewController: UIViewController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// Make a button to call the showFluttaaer function when pressed.
let
button
=
UIButton
(
type
:
UIButton
.
ButtonType
.
custom
)
button
.
addTarget
(
self
,
action
:
#selector(
showFlutter
)
,
for
:
.
touchUpInside
)
button
.
setTitle
(
"Show Flutter!"
,
for
:
UIControl
.
State
.
normal
)
...
...
@@ -29,17 +28,17 @@ class ViewController: UIViewController {
binaryMessenger
:
flutterEngine
.
binaryMessenger
)
methodChannel
?
.
setMethodCallHandler
{
[
weak
self
]
(
call
:
FlutterMethodCall
,
result
:
@escaping
FlutterResult
)
in
if
let
strongSelf
=
self
{
switch
call
.
method
{
case
"init"
:
result
(
self
?
.
dicValueString
(
self
!.
getData
()))
case
"teachingEnd"
:
strongSelf
.
navigationController
?
.
popViewController
(
animated
:
true
)
default
:
// Unrecognized method name
print
(
"Unrecognized method name:
\(
call
.
method
)
"
)
if
let
strongSelf
=
self
{
switch
call
.
method
{
case
"init"
:
result
(
self
?
.
dicValueString
(
self
!.
getData
()))
case
"teachingEnd"
:
strongSelf
.
presentedViewController
?
.
dismiss
(
animated
:
true
)
default
:
// Unrecognized method name
print
(
"Unrecognized method name:
\(
call
.
method
)
"
)
}
}
}
}
}
}
...
...
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