首页 > 代码库 > Foundation Protocols

Foundation Protocols

Protocols

Protocol

Abstract

NSCacheDelegate

The delegate of an NSCache object implements this protocol to perform specialized actions when an object is about to be evicted or removed from the cache.

NSCache对象的代理,实现该协议,当对象即将被驱逐或从缓存中移除时,执行特定动作

NSCoding

The NSCoding protocol declares the two methods that a class must implement so that instances of that class can be encoded and decoded.

NSCoding协议声明了两个为了使类实例可以编码和解码所必须实现的方法

NSCopying

The NSCopying protocol declares a method for providing functional copies of an object.

NSCopying协议声明了对象复制功能副本所需要提供的一个方法

NSDecimalNumberBehaviors

The NSDecimalBehaviors protocol declares three methods that control the discretionary aspects of working with NSDecimalNumber objects.

NSDiscardableContent

You implement this protocol when a class’s objects have subcomponents that can be discarded when not being used, thereby giving an application a smaller memory footprint.

NSErrorRecoveryAttempting

 

NSExtensionRequestHandling

The NSExtensionRequestHandling protocol provides a life cycle hook into an app extension.

NSFastEnumeration

The fast enumeration protocol NSFastEnumeration must be adopted and implemented by objects used in conjunction with the for language construct used in conjunction with Cocoa objects.

NSFileManagerDelegate

The NSFileManagerDelegate protocol defines optional methods for managing operations involving the copying, moving, linking, or removal of files and directories.

NSFilePresenter

The NSFilePresenter protocol should be implemented by objects that allow the user to view or edit the content of files or directories.

NSKeyValueCoding

 

NSKeyValueObserving

 

NSKeyedArchiverDelegate

The NSKeyedArchiverDelegate protocol defines the optional methods implemented by delegates of NSKeyedArchiverobjects.

NSKeyedUnarchiverDelegate

The NSKeyedUnarchiverDelegate protocol defines the optional methods implemented by delegates of NSKeyedUnarchiver objects.

NSLocking

The NSLocking protocol declares the elementary methods adopted by classes that define lock objects.

NSMachPortDelegate

The NSMachPortDelegate protocol defines the optional methods implemented by delegates of NSMachPort objects.

NSMetadataQueryDelegate

The NSMetadataQueryDelegate protocol defines the optional methods implemented by delegates of NSMetadataQueryobjects.

NSMutableCopying

The NSMutableCopying protocol declares a method for providing mutable copies of an object.

NSNetServiceBrowserDelegate

The NSNetServiceBrowserDelegate protocol defines the optional methods implemented by delegates of NSNetServiceBrowser objects.

NSNetServiceDelegate

The NSNetServiceDelegate protocol defines the optional methods implemented by delegates of NSNetService objects.

NSObject

 

NSPortDelegate

The NSPortDelegate protocol defines the optional methods implemented by delegates of NSPort objects.

NSSecureCoding

Conforming to the NSSecureCoding protocol indicates that an object handles encoding and decoding instances of itself in a manner that is robust against object substitution attacks.

NSStreamDelegate

The NSStreamDelegate protocol defines the optional methods implemented by delegates of NSStream objects.

NSURLAuthenticationChallengeSender

The NSURLAuthenticationChallengeSender protocol represents the interface that the sender of an authentication challenge must implement.

NSURLConnectionDataDelegate

The NSURLConnectionDataDelegate protocol describes methods that should be implemented by the delegate for an instance of the NSURLConnection class.

NSURLConnectionDelegate

The NSURLConnectionDelegate protocol defines methods common to the NSURLConnectionDataDelegate and NSURLConnectionDownloadDelegate protocols.

NSURLConnectionDownloadDelegate

The NSURLConnectionDownloadDelegate protocol describes methods that should be implemented by the delegate of instances of NSURLConnection created using Newsstand Kit’s downloadWithDelegate: method.

NSURLProtocolClient

The NSURLProtocolClient protocol provides the interface used by NSURLProtocol subclasses to communicate with the URL loading system.

NSURLSessionDataDelegate

The NSURLSessionDataDelegate protocol defines the methods that a delegate of an NSURLSession object can implement to handle task-level events specific to data tasks and upload tasks.

NSURLSessionDelegate

The NSURLSessionDelegate protocol describes the methods that NSURLSession objects call on their delegates to handle session-level events.

NSURLSessionDownloadDelegate

The NSURLSessionDownloadDelegate protocol defines delegate methods that you should implement when using NSURLSession download tasks.

NSURLSessionTaskDelegate

The NSURLSessionTaskDelegate protocol defines the task-specific delegate methods that you should implement when working with any type of NSURLSession task.

NSUserActivityDelegate

An object conforming to the NSUserActivityDelegate protocol works with an NSUserActivity object, which encapsulates the state of a user activity in an application on a particular device and enables the same activity to be continued on another device.

NSXMLParserDelegate

The NSXMLParserDelegate protocol defines the optional methods implemented by delegates of NSXMLParser objects.

Foundation Protocols