🔗
【iOS18.2までの旧形式 / iOS16からの新形式】URLのappend系の世代交代まとめ
append系の世代交代の部分のみ。
| 新旧 | 使えるiOS | 名前 | 引数 | 第一引数に渡すもの | 返されるもの |
|---|---|---|---|---|---|
| 旧 | 18.2まで | appendPathComponent | (_:) | String | なし |
| 旧 | 18.2まで | appendingPathComponent | (_:) | String | URL |
| 旧 | 18.2まで | appendPathComponent | (_:isDirectory:) | String | なし |
| 旧 | 18.2まで | appendingPathComponent | (_:isDirectory:) | String | URL |
| 新 | 16から | append | (path:directoryHint:) | StringProtocol | なし |
| 新 | 16から | appending | (path:directoryHint:) | StringProtocol | URL |
| 新 | 16から | append | (component:directoryHint:) | StringProtocol | なし |
| 新 | 16から | appending | (component:directoryHint:) | StringProtocol | URL |
| 新 | 16から | append | (components:directoryHint:) | StringProtocol... | なし |
| 新 | 16から | appending | (components:directoryHint:) | StringProtocol... | URL |
append は直接編集、appending は新インスタンスを返す。
component は単数、components は複数
path: と component: を2つ用意する理由は何かあるのだろうか。
Discussion