1
2

More than 1 year has passed since last update.

【Swift】重複しない綺麗な数列を作る

Last updated at Posted at 2023-02-10

はじめに

保存機能を作成している際に、重複しないファイル名を付けるために書いたコードを記録しておきます。
もっといい方法があれば、コメントください!!

やりかた

let timeInterval = Int(Date.now.timeIntervalSince1970 * 1_000_000)
print(timeInterval.description) // 1676029701621150

スクリーンショット 2023-02-10 20.48.41.png

おわり

これ重複しないよな。。。?

1
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2