2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Swift】インポート範囲を制限

2
Posted at

はじめに

このリポジトリのコードを見ていたら以下のようなコードを見つけました。

import struct SwiftUI.AppStrage

気になったので記録しておきます。

やりかた

import struct SwiftUI.Color
import class UIKit.UIColor

Viewなどにエラーが出ていることから実際にインポート範囲が制限されていることがわかります。
スクリーンショット 2023-01-31 21 36 45

おわり

インポート範囲を制限すると平均ビルド時間が増えるそうです笑

参考記事

2
1
0

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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?