AppleMutableArray - UBogun/Xojo-iosLib GitHub Wiki

Inherits from AppleArray
Memory leak check: failed, this class leaks some memory depending on its number of elements.
Status: Very incomplete

This is an implementation of NSMutableArray, the iOS native mutable class for arrays.
AppleMutableArray is interchangeable with AppleCFMutableArray

Constructors

Constructor (): Returns an empty array.

Constructor (Capacity as UInteger): Returns an empty array prepared for Capacity items.

Constructor (Id As Ptr): For receiving NSArrays from iOS methods.

Methods

AddObject (anObject As iOSLibGeneralObject): Appends anObject to the array.

AddPtr (aPointer As Ptr): Appends the Ptr value to the array.

AddText (aText As CFStringRef): Adds a Text value to the array.

RemoveObjectAtIndex (Index As UInteger): Removes the entry at position Index from the array.

##Shared Methods CGColorArray (ColorArray() As Color) As AppleMutableArray: Converts a Xojo array of colors to a mutable array of CGColors.

fromAppleObjects (Objects() As AppleObject / Paramarray of AppleObjects) As AppleMutableArray: Converts a Xojo array or ParamArray of AppleObjects into a mutable array.

fromGeneralObjects (Objects() As AppleGeneralObject / ParamArray of AppleGeneralObjects) As AppleMutableArray: Same as above but for all AppleObjects.

NSPointArray (PointArray() As NSPoint) As AppleMutableArray: Converts a Xojo array of NSPoint to a mutable array of AppleValue.

NumberArray (Numbers() As Double) As AppleMutableArray: Converts a Xojo array of doubles to a mutable array of AppleNumber.