Swift 基本语法

gefhabcd 13 0 PDF 2021-01-16 22:01:07

Swift 基本语法 在上一章节中我们已经讲到如何创建 Swift 语言的 “Hello, World!” 程序。现在我们来复习下。 如果创建的是 OS X playground 需要引入 Cocoa : import Cocoa /* 我的第一个 Swift 程序 */ var myString = Hello, World! print(myString) 如果我们想创建 iOS playground 则需要引入 UIKit : import UIKit var myString = Hello, World! print(myString) 执行以上程序,输出结果为

用户评论
请输入评论内容
评分:
暂无评论