Open Instance Methodswift 6.0.3Foundation
encode(with:)
func encode(with aCoder: NSCoder)
func encode(with aCoder: NSCoder)
s10Foundation14NSDateIntervalC6encode4withyAA7NSCoderC_tF
What are these?7ADBR
import Foundation
class NSDateInterval
class NSCoder
The NSCoder
abstract class declares the interface used by concrete subclasses to transfer objects and other values between memory and some other format. This capability provides the basis for archiving (where objects and data items are stored on disk) and distribution (where objects and data items are copied between different processes or threads). The concrete subclasses provided by Foundation for these purposes are NSKeyedArchiver
and NSKeyedUnarchiver
. Concrete subclasses of NSCoder
are referred to in general as coder classes, and instances of these classes as coder objects (or simply coders). A coder object that can only encode values is referred to as an encoder object, and one that can only decode values as a decoder object.
override convenience init()
required convenience init?(coder: NSCoder)
init(start startDate: Date, duration: TimeInterval)
convenience init(start startDate: Date, end endDate: Date)
static var supportsSecureCoding: Bool { get }
let duration: TimeInterval
var endDate: Date { get }
let startDate: Date
static func < (lhs: NSDateInterval, rhs: NSDateInterval) -> Bool
func compare(_ dateInterval: DateInterval) -> ComparisonResult
func contains(_ date: Date) -> Bool
func copy(with zone: NSZone?) -> Any
func intersection(with dateInterval: DateInterval) -> DateInterval?
func intersects(_ dateInterval: DateInterval) -> Bool
func isEqual(to dateInterval: DateInterval) -> Bool