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
assetManagerand tries to cast it to specifiedresourceType.Declaration
Objective-C
+ (nullable id<ISCIDisposable>) tryGetResourceWithId:(nonnull SCIResourceId *)resourceId type:(nonnull Protocol *)type fromAssetManager:(nonnull id<ISCIAssetManager2D>)assetManager;Swift
class func tryGetResource(with resourceId: SCIResourceId, type: Protocol, from assetManager: any ISCIAssetManager2D) -> (any ISCIDisposable)?Parameters
resourceIdThe resource id.
typeThe resource type.
assetManagerThe 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
assetManagerwith specified size.Declaration
Objective-C
+ (nullable id<ISCITexture2D>) tryGetTextureWithId:(nonnull SCIResourceId *)resourceId size:(CGSize)size fromAssetManager:(nonnull id<ISCIAssetManager2D>)assetManager;Swift
class func tryGetTexture(with resourceId: SCIResourceId, size: CGSize, from assetManager: any ISCIAssetManager2D) -> (any ISCITexture2D)?Parameters
resourceIdThe resource id.
sizeThe size of texture.
assetManagerThe asset manager to use.
Return Value
The texture if it satisfies the size and type constraint, otherwise - returns
nil.
View on GitHub