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 ,才能进行状态保留和还原。 这些方法便于测试状态保留过程的各个方面。

适用于