共用方式為


UIApplicationDelegate.ShouldSaveApplicationState 方法

定義

應用程式是否應該儲存應用程式狀態資訊。

[Foundation.Export("application:shouldSaveApplicationState:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual bool ShouldSaveApplicationState (UIKit.UIApplication application, Foundation.NSCoder coder);
abstract member ShouldSaveApplicationState : UIKit.UIApplication * Foundation.NSCoder -> bool
override this.ShouldSaveApplicationState : UIKit.UIApplication * Foundation.NSCoder -> bool

參數

application
UIApplication

叫用這個委派方法的 UIApplication 參考。

coder
NSCoder

傳回

屬性

備註

此方法和 ShouldRestoreApplicationState(UIApplication, NSCoder) 都必須傳回 true 狀態保留和還原才能發生。 這些方法方便測試狀態保留程式的各個層面。

適用於