Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は Objective-C と XCode が初めてで、何か新しいことを学ぼうとしています。swift を使用して stdin から文字列を読み取る方法はありますか? C++ の cin のようなものですか?
Objective-C と同様に、以下を使用できますNSFileHandle。
NSFileHandle
let standardInput = NSFileHandle.fileHandleWithStandardInput() let input = standardInput.availableData