One Logo Pool Ball
Foundation · IOS API REFERENCE

NSSet

class · SDK 27.1

class NSSet

Members (35)

init

init

TypeScript
static initObject(object: unknown): NSSet
Swift declaration
convenience init(object: Any)
init

init

TypeScript
static initObjectsCount(objects: SDKHandle, cnt: number): NSSet
Swift declaration
convenience init(objects: UnsafePointer<AnyObject>, count cnt: Int)
method

addObserver

TypeScript
addObserver(observer: _ObjectiveC_NSObject, keyPath: string, options?: NSKeyValueObservingOptions, context?: (SDKHandle) | null): void
Swift declaration
func addObserver(_ observer: NSObject, forKeyPath keyPath: String, options: NSKeyValueObservingOptions = [], context: UnsafeMutableRawPointer?)
method

anyObject

TypeScript
anyObject(): (unknown) | null
Swift declaration
func anyObject() -> Any?
method

contains

TypeScript
contains(anObject: unknown): boolean
Swift declaration
func contains(_ anObject: Any) -> Bool
method

description

TypeScript
descriptionWithLocale(locale?: (unknown) | null): string
Swift declaration
func description(withLocale locale: Any?) -> String
method · iOS 4.0+

enumerateObjects

TypeScript
enumerateObjects(block: ((arg0: unknown, arg1: NativeOut<boolean>) => void)): void
Swift declaration
func enumerateObjects(_ block: (Any, UnsafeMutablePointer<ObjCBool>) -> Void)
method · iOS 4.0+

enumerateObjects

TypeScript
enumerateObjectsOptionsUsing(opts: NSEnumerationOptions, block: ((arg0: unknown, arg1: NativeOut<boolean>) => void)): void
Swift declaration
func enumerateObjects(options opts: NSEnumerationOptions = [], using block: (Any, UnsafeMutablePointer<ObjCBool>) -> Void)
method · iOS 3.0+

filtered

TypeScript
filtered(predicate: NSPredicate): Array<unknown>
Swift declaration
func filtered(using predicate: NSPredicate) -> Set<AnyHashable>
init

init

TypeScript
static init(): NSSet
Swift declaration
init()
init

init

TypeScript
static initArray(array: Array<unknown>): NSSet
Swift declaration
convenience init(array: [Any])
init

init

TypeScript
static initCoder(coder: NSCoder): (NSSet) | null
Swift declaration
init?(coder: NSCoder)
init

init

TypeScript
static initObjectsCount19778(objects: (SDKHandle) | null, cnt: number): NSSet
Swift declaration
init(objects: UnsafePointer<AnyObject>?, count cnt: Int)
init

init

TypeScript
static initSet(set: Array<unknown>): NSSet
Swift declaration
convenience init(set: Set<AnyHashable>)
init

init

TypeScript
static initSetCopyItems(set: Array<unknown>, flag: boolean): NSSet
Swift declaration
convenience init(set: Set<AnyHashable>, copyItems flag: Bool)
method

intersects

TypeScript
intersects(otherSet: Array<unknown>): boolean
Swift declaration
func intersects(_ otherSet: Set<AnyHashable>) -> Bool
method

isEqual

TypeScript
isEqual(otherSet: Array<unknown>): boolean
Swift declaration
func isEqual(to otherSet: Set<AnyHashable>) -> Bool
method

isSubset

TypeScript
isSubset(otherSet: Array<unknown>): boolean
Swift declaration
func isSubset(of otherSet: Set<AnyHashable>) -> Bool
method

member

TypeScript
member(object: unknown): (unknown) | null
Swift declaration
func member(_ object: Any) -> Any?
method

objectEnumerator

TypeScript
objectEnumerator(): NSEnumerator
Swift declaration
func objectEnumerator() -> NSEnumerator
method

removeObserver

TypeScript
removeObserverForKeyPath(observer: _ObjectiveC_NSObject, keyPath: string): void
Swift declaration
func removeObserver(_ observer: NSObject, forKeyPath keyPath: String)
method · iOS 5.0+

removeObserver

TypeScript
removeObserverForKeyPathContext(observer: _ObjectiveC_NSObject, keyPath: string, context?: (SDKHandle) | null): void
Swift declaration
func removeObserver(_ observer: NSObject, forKeyPath keyPath: String, context: UnsafeMutableRawPointer?)
method · iOS 2.0+

adding

TypeScript
adding(anObject: unknown): Array<unknown>
Swift declaration
func adding(_ anObject: Any) -> Set<AnyHashable>
method · iOS 2.0+

addingObjects

TypeScript
addingObjectsFrom(other: Array<unknown>): Array<unknown>
Swift declaration
func addingObjects(from other: [Any]) -> Set<AnyHashable>
method · iOS 2.0+

addingObjects

TypeScript
addingObjectsFrom53755(other: Array<unknown>): Array<unknown>
Swift declaration
func addingObjects(from other: Set<AnyHashable>) -> Set<AnyHashable>
method

setValue

TypeScript
setValue(value: (unknown) | null, key: string): void
Swift declaration
func setValue(_ value: Any?, forKey key: String)
method · iOS 4.0+

sortedArray

TypeScript
sortedArray(sortDescriptors: Array<NSSortDescriptor>): Array<unknown>
Swift declaration
func sortedArray(using sortDescriptors: [NSSortDescriptor]) -> [Any]
method

value

TypeScript
value(key: string): unknown
Swift declaration
func value(forKey key: String) -> Any
get

allObjects

TypeScript
get allObjects(): Array<unknown>
Swift declaration
var allObjects: [Any] { get }
get

count

TypeScript
get count(): number
Swift declaration
var count: Int { get }
get

description

TypeScript
get description(): string
Swift declaration
var description: String { get }
get · iOS 8.0+

customMirror

TypeScript
get customMirror(): SDKHandle
Swift declaration
var customMirror: Mirror { get }

The custom mirror for this instance. If this type has value semantics, the mirror should be unaffected by subsequent mutations of the instance.

method · iOS 8.0+

makeIterator

TypeScript
makeIterator(): NSFastEnumerationIterator
Swift declaration
func makeIterator() -> NSFastEnumerationIterator

Return an *iterator* over the elements of this *sequence*. - Complexity: O(1).

get · iOS 8.0+

underestimatedCount

TypeScript
get underestimatedCount(): number
Swift declaration
@nonobjc var underestimatedCount: Int { get }

A value less than or equal to the number of elements in the collection. - Complexity: O(1).

init · iOS 8.0+

init

TypeScript
static initSet61343(anSet: NSSet): NSSet
Swift declaration
@nonobjc convenience init(set anSet: NSSet)

Initializes a newly allocated set and adds to it objects from another given set. - Returns: An initialized objects set containing the objects from `set`. The returned set might be different than the original receiver.

Skipped declarations

4 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NSSet.init(objects:)

A variable number of Swift arguments is not supported.

NSSet.init(arrayLiteral:)

A variable number of Swift arguments is not supported.

NSSet.objects(passingTest:)

callback cannot propagate synchronous failure

NSSet.objects(options:passingTest:)

callback cannot propagate synchronous failure

All Foundation types →