🔗
【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