FREArray
open class FREArray : Sequence
FREArray: Additional type which matches Java version of FRE
-
iterator for FREArray
for fre in airArray { }Declaration
Swift
public func makeIterator() -> Array<FREObject>.Iterator -
raw FREObject value
Declaration
Swift
public var rawValue: FREObject? -
init: Initialise a FREArray from a FREObject.
Declaration
Swift
public init(_ freObject: FREObject)Parameters
freObjectFREObject which is of AS3 type Array
-
init: Initialise a FREArray containing a Vector of type specified by className.
let newPerson = FREArray(className: "com.tuarua.Person", length: 5, fixed: true)Declaration
Swift
public init?(className: String, length: Int = 0, fixed: Bool = false, items: [FREObject?]? = nil)Parameters
classNamename of AS3 class to create
lengthnumber of elements in the array
fixedwhether the array is fixed
itemspopulates the FREArray with the supplied Array of FREObjects
-
init: Initialise a FREArray with a [Int].
Declaration
Swift
public init?(intArray array: [Int])Parameters
intArrayarray to be converted
-
init: Initialise a FREArray with a [UInt].
Declaration
Swift
public init(uintArray array: [UInt])Parameters
intArrayarray to be converted
-
init: Initialise a FREArray with a [String].
Declaration
Swift
public init(stringArray array: [String])Parameters
stringArrayarray to be converted
-
init: Initialise a FREArray with a [String?].
Declaration
Swift
public init(optionalStringArray array: [String?])Parameters
stringArrayarray to be converted
-
init: Initialise a FREArray with a [Double].
Declaration
Swift
public init(doubleArray array: [Double])Parameters
doubleArrayarray to be converted
-
init: Initialise a FREArray with a [NSNumber].
Declaration
Swift
public init(numberArray array: [NSNumber])Parameters
doubleArrayarray to be converted
-
init: Initialise a FREArray with a [Bool].
Declaration
Swift
public init(boolArray array: [Bool])Parameters
boolArrayarray to be converted
-
init: Initialise a FREArray with a [Date].
Declaration
Swift
public init(dateArray array: [Date])Parameters
dateArrayarray to be converted
-
init: Initialise a FREArray with a [Any].
Declaration
Swift
public init(anyArray array: [Any])Parameters
anyArrayarray to be converted
-
push: Adds one or more elements to the end of an array and returns the new length of the array.
Declaration
Swift
@discardableResult public func push(_ args: Any?...) -> UIntParameters
argsOne or more values to append to the array.
Return Value
UInt An integer representing the length of the new array.
-
insert: Insert a single element into the FREArray.
Declaration
Swift
public func insert(_ freObject: FREObject?, at index: Int)Parameters
freObjectFREObject
atAn Int that specifies the position in the Vector where the element is to be inserted. You can use a negative Int to specify a position relative to the end of the FREArray (for example, -1 for the last element of the FREArray)
-
remove: Remove a single element from the Vector. This method modifies the FREArray without making a copy.
Declaration
Swift
@discardableResult public func remove(at index: Int) -> FREObject?Parameters
atAn Int that specifies the index of the element in the FREArray that is to be deleted. / You can use a negative Int to specify a position relative to the end of the FREArray / (for example, -1 for the last element of the Vector).
Return Value
FREObject? The element that was removed from the original FREArray
-
length: Length of FREArray
Declaration
Swift
public var length: UInt { get } -
isEmpty: A Boolean value indicating whether the FREArray is empty.
Declaration
Swift
public var isEmpty: Bool { get } -
value: Converts FREArray to Swift array
Declaration
Swift
public var value: [Any?] { get }Return Value
[Any?]
-
accessor: gets/sets FREObject at position index
Declaration
Swift
subscript(index: UInt) -> FREObject? { get set }Parameters
indexReturn Value
FREObject?
-
accessor: gets/sets FREObject at position index
Declaration
Swift
subscript(index: UInt) -> FREArray? { get set }Parameters
indexReturn Value
FREArray
-
accessor: gets/sets Int at position index
Declaration
Swift
subscript(index: UInt) -> Int { get set }Parameters
indexReturn Value
Int
-
accessor: gets/sets UInt at position index
Declaration
Swift
subscript(index: UInt) -> UInt { get set }Parameters
indexReturn Value
UInt
-
accessor: gets/sets UInt at position index
Declaration
Swift
subscript(index: UInt) -> Bool { get set }Parameters
indexReturn Value
Bool
-
accessor: gets/sets NSNumber at position index
Declaration
Swift
subscript(index: UInt) -> NSNumber { get set }Parameters
indexReturn Value
NSNumber
-
accessor: gets/sets Double at position index
Declaration
Swift
subscript(index: UInt) -> Double { get set }Parameters
indexReturn Value
Double
-
accessor: gets/sets CGFloat at position index
Declaration
Swift
subscript(index: UInt) -> CGFloat { get set }Parameters
indexReturn Value
CGFloat
-
accessor: gets/sets Date at position index
Declaration
Swift
subscript(index: UInt) -> Date { get set }Parameters
indexReturn Value
Date
-
accessor: gets/sets String at position index
Declaration
Swift
subscript(index: UInt) -> String? { get set }Parameters
indexReturn Value
String?
View on GitHub
Install in Dash
FREArray Class Reference