iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SCIAssetManagerUtil

@interface SCIAssetManagerUtil : NSObject

Helper class with some methods for work with ISCIAssetManager2D class.

  • Gets resource from assetManager and tries to cast it to specified resourceType.

    Declaration

    Objective-C

    + (nullable id<ISCIDisposable>)
        tryGetResourceWithId:(nonnull SCIResourceId *)resourceId
                        type:(nonnull Protocol *)type
            fromAssetManager:(nonnull id<ISCIAssetManager2D>)assetManager;

    Parameters

    resourceId

    The resource id.

    type

    The resource type.

    assetManager

    The asset manager to use.

    Return Value

    Casted resource if it possible and if cast isn’t possible then returns nil.

  • Tries to get texture from assetManager with specified size.

    Declaration

    Objective-C

    + (nullable id<ISCITexture2D>)
        tryGetTextureWithId:(nonnull SCIResourceId *)resourceId
                       size:(CGSize)size
           fromAssetManager:(nonnull id<ISCIAssetManager2D>)assetManager;

    Parameters

    resourceId

    The resource id.

    size

    The size of texture.

    assetManager

    The asset manager to use.

    Return Value

    The texture if it satisfies the size and type constraint, otherwise - returns nil.