mirror of
https://github.com/rive-app/rive-ios.git
synced 2026-01-18 17:11:28 +01:00
This adds support for getting / setting nested text runs on iOS, via the exposed lower-level API. Tests have been added for: testing that setting the text run works at the artboard level, and at the view model level, and additionally that the parent text run will be returned if the path is empty. Diffs= bbec5cbbc Add support for nested text runs on iOS (#8108) Co-authored-by: David Skuza <david@rive.app>
63 lines
1.8 KiB
Objective-C
63 lines
1.8 KiB
Objective-C
//
|
|
// RiveArtboard.h
|
|
// RiveRuntime
|
|
//
|
|
// Created by Maxwell Talbot on 5/14/21.
|
|
// Copyright © 2021 Rive. All rights reserved.
|
|
//
|
|
#pragma once
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class RiveLinearAnimationInstance;
|
|
@class RiveSMIBool;
|
|
@class RiveSMITrigger;
|
|
@class RiveSMINumber;
|
|
@class RiveStateMachineInstance;
|
|
@class RiveRenderer;
|
|
@class RiveTextValueRun;
|
|
|
|
// MARK: - RiveArtboard
|
|
//
|
|
@interface RiveArtboard : NSObject
|
|
|
|
@property(nonatomic, assign) float volume NS_REFINED_FOR_SWIFT;
|
|
|
|
- (NSString*)name;
|
|
- (CGRect)bounds;
|
|
|
|
- (const RiveSMIBool*)getBool:(NSString*)name path:(NSString*)path;
|
|
- (const RiveSMITrigger*)getTrigger:(NSString*)name path:(NSString*)path;
|
|
- (const RiveSMINumber*)getNumber:(NSString*)name path:(NSString*)path;
|
|
|
|
- (NSInteger)animationCount;
|
|
- (NSArray<NSString*>*)animationNames;
|
|
- (RiveLinearAnimationInstance* __nullable)animationFromIndex:(NSInteger)index
|
|
error:(NSError**)error;
|
|
- (RiveLinearAnimationInstance* __nullable)animationFromName:(NSString*)name error:(NSError**)error;
|
|
|
|
- (NSInteger)stateMachineCount;
|
|
- (NSArray<NSString*>*)stateMachineNames;
|
|
- (RiveStateMachineInstance* __nullable)stateMachineFromIndex:(NSInteger)index
|
|
error:(NSError**)error;
|
|
- (RiveStateMachineInstance* __nullable)stateMachineFromName:(NSString*)name error:(NSError**)error;
|
|
- (RiveStateMachineInstance* __nullable)defaultStateMachine;
|
|
|
|
- (RiveTextValueRun* __nullable)textRun:(NSString*)name;
|
|
- (RiveTextValueRun* __nullable)textRun:(NSString*)name path:(NSString*)path;
|
|
|
|
- (void)advanceBy:(double)elapsedSeconds;
|
|
- (void)draw:(RiveRenderer*)renderer;
|
|
|
|
// MARK: Debug
|
|
|
|
#if RIVE_ENABLE_REFERENCE_COUNTING
|
|
+ (int)instanceCount;
|
|
#endif // RIVE_ENABLE_REFERENCE_COUNTING
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|