Any & AnyObject Types(Data Types): And is and as Operators in Swift Programming Language:
* Swift Provides two special type aliases for working with Non-Specific types:
* AnyObject can represent an instance of any class type:
* Any can represent an instance of any type at all, including function types:
* Any can hold the any type of the data like, Int, Float, Double, and Strings, and Structs and Classes
* AnyObject is only for reference types (classes), Any is for both value and reference types.
* Use is, as, To check and downcast types
* Any & AnyObject types in swift
is typeCheck operator . and as? as! type convert operator
------------------------------------------------------------------------------------------------------------------
Thank you - Vikranth Apps
Download
0 formats
No download links available.
24-Any & AnyObject types | is typeCheck operator | as? as! type conversion(casting)operator| Swift | NatokHD