Documentation Archive Developer
Search

ObjectiveC Changes

ObjectiveC

Removed NSUIntegerMax
Added objc_method_description.init()
Added objc_method_description.init(name: Selector, types: UnsafeMutablePointer<Int8>)
Added objc_object.init()
Added objc_object.init(isa: AnyClass!)
Added objc_property_attribute_t.init()
Added objc_property_attribute_t.init(name: UnsafePointer<Int8>, value: UnsafePointer<Int8>)
Added objc_super.init()
Added objc_super.init(receiver: AnyObject!, super_class: AnyClass!)
Modified NSObject.alloc() -> Self [class]
DeclarationIntroduction
From
class func alloc() -> Self!
iOS 8.0
To
class func alloc() -> Self
iOS 8.3

Modified NSObject.allocWithZone(NSZone) -> Self [class]
DeclarationIntroduction
From
class func allocWithZone(_ zone: NSZone) -> Self!
iOS 8.1
To
class func allocWithZone(_ zone: NSZone) -> Self
iOS 8.3

Modified NSObject.new() -> Self [class]
DeclarationIntroduction
From
class func `new`() -> Self!
iOS 8.0
To
class func new() -> Self
iOS 8.3

Modified NSObjectProtocol.self() -> Self
DeclarationIntroduction
From
func `self`() -> Self!
iOS 8.0
To
func `self`() -> Self
iOS 8.3

Modified objc_method_description [struct]
Declaration
From
struct objc_method_description {
    var name: Selector
    var types: UnsafeMutablePointer<Int8>
}
To
struct objc_method_description {
    var name: Selector
    var types: UnsafeMutablePointer<Int8>
    init()
    init(name name: Selector, types types: UnsafeMutablePointer<Int8>)
}

Modified objc_object [struct]
Declaration
From
struct objc_object {
    var isa: AnyClass!
}
To
struct objc_object {
    var isa: AnyClass!
    init()
    init(isa isa: AnyClass!)
}

Modified objc_property_attribute_t [struct]
Declaration
From
struct objc_property_attribute_t {
    var name: UnsafePointer<Int8>
    var value: UnsafePointer<Int8>
}
To
struct objc_property_attribute_t {
    var name: UnsafePointer<Int8>
    var value: UnsafePointer<Int8>
    init()
    init(name name: UnsafePointer<Int8>, value value: UnsafePointer<Int8>)
}

Modified objc_super [struct]
Declaration
From
struct objc_super {
    var receiver: AnyObject!
    var super_class: AnyClass!
}
To
struct objc_super {
    var receiver: AnyObject!
    var super_class: AnyClass!
    init()
    init(receiver receiver: AnyObject!, super_class super_class: AnyClass!)
}

Modified autoreleasepool(() -> ())
Declaration
From
func autoreleasepool(_ code: () -> ())
To
func autoreleasepool(_ code: @noescape () -> ())

Modified class_addIvar(AnyClass!, UnsafePointer<Int8>, Int, UInt8, UnsafePointer<Int8>) -> Bool
Declaration
From
func class_addIvar(_ cls: AnyClass!, _ name: UnsafePointer<Int8>, _ size: UInt, _ alignment: UInt8, _ types: UnsafePointer<Int8>) -> Bool
To
func class_addIvar(_ cls: AnyClass!, _ name: UnsafePointer<Int8>, _ size: Int, _ alignment: UInt8, _ types: UnsafePointer<Int8>) -> Bool

Modified class_getInstanceSize(AnyClass!) -> Int
Declaration
From
func class_getInstanceSize(_ cls: AnyClass!) -> UInt
To
func class_getInstanceSize(_ cls: AnyClass!) -> Int

Modified method_getArgumentType(Method, UInt32, UnsafeMutablePointer<Int8>, Int)
Declaration
From
func method_getArgumentType(_ m: Method, _ index: UInt32, _ dst: UnsafeMutablePointer<Int8>, _ dst_len: UInt)
To
func method_getArgumentType(_ m: Method, _ index: UInt32, _ dst: UnsafeMutablePointer<Int8>, _ dst_len: Int)

Modified method_getReturnType(Method, UnsafeMutablePointer<Int8>, Int)
Declaration
From
func method_getReturnType(_ m: Method, _ dst: UnsafeMutablePointer<Int8>, _ dst_len: UInt)
To
func method_getReturnType(_ m: Method, _ dst: UnsafeMutablePointer<Int8>, _ dst_len: Int)

Modified objc_allocateClassPair(AnyClass!, UnsafePointer<Int8>, Int) -> AnyClass!
Declaration
From
func objc_allocateClassPair(_ superclass: AnyClass!, _ name: UnsafePointer<Int8>, _ extraBytes: UInt) -> AnyClass!
To
func objc_allocateClassPair(_ superclass: AnyClass!, _ name: UnsafePointer<Int8>, _ extraBytes: Int) -> AnyClass!

Modified objc_duplicateClass(AnyClass!, UnsafePointer<Int8>, Int) -> AnyClass!
Declaration
From
func objc_duplicateClass(_ original: AnyClass!, _ name: UnsafePointer<Int8>, _ extraBytes: UInt) -> AnyClass!
To
func objc_duplicateClass(_ original: AnyClass!, _ name: UnsafePointer<Int8>, _ extraBytes: Int) -> AnyClass!

Modified objc_memmove_collectable(UnsafeMutablePointer<Void>, UnsafePointer<Void>, Int) -> UnsafeMutablePointer<Void>
DeclarationIntroduction
From
func objc_memmove_collectable(_ dst: UnsafeMutablePointer<Void>, _ src: UnsafePointer<Void>, _ size: UInt) -> UnsafeMutablePointer<Void>
iOS 8.0
To
func objc_memmove_collectable(_ dst: UnsafeMutablePointer<Void>, _ src: UnsafePointer<Void>, _ size: Int) -> UnsafeMutablePointer<Void>
iOS 8.3

Modified objc_setCollectionRatio(Int)
DeclarationIntroduction
From
func objc_setCollectionRatio(_ ratio: UInt)
iOS 8.0
To
func objc_setCollectionRatio(_ ratio: Int)
iOS 8.3

Modified objc_setCollectionThreshold(Int)
DeclarationIntroduction
From
func objc_setCollectionThreshold(_ threshold: UInt)
iOS 8.0
To
func objc_setCollectionThreshold(_ threshold: Int)
iOS 8.3

Modified objc_set_collection_ratio(Int)
DeclarationIntroduction
From
func objc_set_collection_ratio(_ ratio: UInt)
iOS 8.0
To
func objc_set_collection_ratio(_ ratio: Int)
iOS 8.3

Modified objc_set_collection_threshold(Int)
DeclarationIntroduction
From
func objc_set_collection_threshold(_ threshold: UInt)
iOS 8.0
To
func objc_set_collection_threshold(_ threshold: Int)
iOS 8.3