- 已关闭**。此问题需要details or clarity。当前不接受答案。
- 想要改进此问题?**添加详细信息并通过editing this post阐明问题。
6小时前关门了。
Improve this question
我是swift的新手,这是我的输入代码,但是我不能在控制台输入任何东西。
import UIKit
print("Enter your name")
if let name=readLine(){
print(name)
}
6小时前关门了。
Improve this question
我是swift的新手,这是我的输入代码,但是我不能在控制台输入任何东西。
import UIKit
print("Enter your name")
if let name=readLine(){
print(name)
}
1条答案
按热度按时间mi7gmzs61#
在xCode开发应用上,输入不是在控制台中进行,而是在模拟设备或物理设备上进行。
1.创建一个新的IOS项目并选择SwiftUI作为接口。
2.替换您的内容视图(.swift)代码:
3.将xxxApp(.swift)代码替换为: