Type Property 型プロパティ

default

The app’s default notification center. アプリの持つ省略時の通知センター。

Declaration 宣言

class var `default`: NotificationCenter { get }

Discussion 議論

All system notifications sent to an app are posted to the default notification center. You can also post your own notifications there. アプリに送られる全てのシステム通知は、default通知センターに投函されます。あなたはまた、あなた独自の通知をそこに投函できます。

If your app uses notifications extensively, you may want to create and post to your own notification centers rather than posting only to the default notification center. When a notification is posted to a notification center, the notification center scans through the list of registered observers, which may slow down your app. By organizing notifications functionally around one or more notification centers, less work is done each time a notification is posted, which can improve performance throughout your app. あなたのアプリが通知を大規模に使うならば、あなたはあなた独自の通知センターを作成してそれに投函したいかもしれません、単にdefault通知センターに投函するのではなく。通知が通知センターに投函される時、通知センターは、登録されたオブザーバのリストを端から端まで走査します、それはあなたのアプリを遅くするかもしれません。ひとつ以上の通知センターに合わせて機能的に通知を組織化することによって、より少ない仕事が通知が投函されるたびに行われます、それはあなたのアプリの至るところで性能を改善します。

See Also 参照

Related Documentation 関連文書