Instance Method インスタンスメソッド

presentedSubitem(at:didMoveTo:)

Tells the delegate that an item in the presented directory moved to a new location. その提示されたディレクトリ中のある項目が新しい場所に移動されたことを、委任先に伝えます。

Declaration 宣言

optional func presentedSubitem(at oldURL: URL, 
                     didMoveTo newURL: URL)

Parameters パラメータ

oldURL

The original URL of the item inside the presented directory. The item need not be at the top level of the presented directory but may itself be inside a nested subdirectory. 提示されるディレクトリ内の項目の元のURL。項目はこの提示されたディレクトリのトップレベルにある必要はなく、入れ子にされた下位ディレクトリ内にそれ自身はあるかもしれません。

newURL

The new URL for the item. This URL may or may not be located inside the presented directory. 項目に対する新しいURL。このURLは、提示されたディレクトリ内に位置するかもしれませんししないかもしれません。

Discussion 議論

This method is relevant for applications that present directories. This might occur if the delegate manages the contents of a directory or manages a file that is implemented as a file package. Your implementation of this method should take whatever actions necessary to handle the change in location of the specified item. For example, you might update references to the item in your application’s data structures and refresh your user interface. このメソッドは、ディレクトリを提示するアプリケーションに関係があるものです。これは、委任先がディレクトリの内容を管理するまたはファイルパッケージとして実装されるファイルを管理するならば、見られるかもしれません。このメソッドのあなたの実装は、指定された項目の場所における変更を取り扱うのに不可欠なアクションは何であれ受け取るべきです。例えば、あなたはあなたのアプリケーションのもつデータ構造体の中の項目への参照を更新して、あなたのユーザインターフェイスをリフレッシュするかもしれません。

If the presented directory is a file package, the system calls the presentedItemDidChange() method if your delegate does not implement this method. 提示されたディレクトリがファイルパッケージならば、システムはpresentedItemDidChange()メソッドを、もしあなたの委任先がこのメソッドを実装しないならば呼び出します。

See Also 参照

Handling Changes to a Presented Directory 提示されたディレクトリに対する変更を取り扱う