Skip to Content
移动端AI与ML应用开发:基于iOS和Android
book

移动端AI与ML应用开发:基于iOS和Android

by Laurence Moroney
January 2023
Intermediate to advanced
288 pages
6h 6m
Chinese
China Machine Press
Content preview from 移动端AI与ML应用开发:基于iOS和Android
110
|
7
一个
.xcworkspace
文件,你应该打开该文件,进行下一步。
7.1.2
2
步:创建带有动作和输出的故事板
正如你在图 7-1 中看到的,这个应用程序的用户界面非常简单。在类似图 7-1 中看到的
布局中添加一个 TextView、一个按钮和一个 Label 控件。将 TextView 放在故事板上之
后,通过检查属性检查器中的可编辑框来确保它是可编辑的。
完成后,你的故事板设计器应如图 7-2 所示。
7-2
:在故事板编辑器中设计用户界面
接下来,你应该为 TextView Label 创建输出,分别称为
txtInput
txtOutput
。还
要为按钮创建一个动作并将其命名为
doExtraction
。如果你不熟悉输出和动作的过程,
请返回第 3 章和第 6 章以获取更多指导示例。
完成后,以下代码应位于你的
ViewController
类中:
@IBOutlet weak var txtInput: UITextView!
@IBOutlet weak var txtOutput: UILabel!
@IBAction func doExtraction(_ sender: Any) {
}
7.1.3
3
步:允许视图控制器用于文本输入
当用户单击顶部的文本视图时,他们将能够通过自己的设备键盘编辑其内容。但是,键
正文.indd 110正文.indd 110 2023-4-30 9:08:452023-4-30 9:08:45
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能驱动的商业智能

人工智能驱动的商业智能

Tobias Zwingmann
Lua游戏AI开发指南

Lua游戏AI开发指南

Posts & Telecom Press, David Young
人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar

Publisher Resources

ISBN: 9787111713081