DSTipConfig
The DSTipConfig
class defines the configurations of tip, including the top left point, width, duration, and coordinate base.
Definition
Assembly: DynamsoftCore.xcframework
@interface DSTipConfig : NSObject
- Objective-C
- Swift
@interface DSTipConfig : NSObject
class TipConfig : NSObject
Attributes
Attributes | Type | Description |
---|---|---|
topLeftPoint |
CGPoint | The top left point of the tip area. |
width |
NSInteger | The width of the tip area. |
duration |
NSInteger | The duration of each tip message will be displayed. |
coordinateBase |
DSCoordinateBase | The coordinate base of the tip message. |
Methods
Method | Description |
---|---|
init |
Create an instance of TipConfig with default configurations. |
initWithCoordinates |
Create an instance of TipConfig. |
topLeftPoint
The top left point of the tip area.
- Objective-C
- Swift
@property(nonatomic, assign) CGPoint topLeftPoint;
var topLeftPoint: CGPoint { get set }
width
The width of the tip area.
- Objective-C
- Swift
@property(nonatomic, assign) NSInteger width;
var width: Int { get set }
duration
The duration of each tip message will be displayed.
- Objective-C
- Swift
@property(nonatomic, assign) NSInteger duration;
var duration: Int { get set }
coordinateBase
The coordinate base of the tip message.
- Objective-C
- Swift
@property(nonatomic, assign) EnumCoordinateBase coordinateBase;
var coordinateBase: EnumCoordinateBase { get set }
init
Create an instance of TipConfig with default configurations.
- Objective-C
- Swift
- (instancetype)init;
init()
Return Value
An instance of TipConfig
.
Code Snippet
- Objective-C
- Swift
TipConfig *config = [[TipConfig alloc] init];
let config = TipConfig()
initWithCoordinates
Create an instance of TipConfig.
- Objective-C
- Swift
- (instancetype)initWithCoordinates:(CGPoint)topLeftPoint width:(NSInteger)width duration:(NSInteger)duration coordinateBase:(EnumCoordinateBase)coordinateBase;
init(topLeftPoint: CGPoint, width: Int, duration: Int, coordinateBase: EnumCoordinateBase)
Parameters
topLeftPoint
: The top left point of the tip area.
width
: The width of the tip area.
duration
: The duration of each tip message will be displayed.
coordinateBase
: The coordinate base of the tip message.
Return Value
An instance of TipConfig
.
Code Snippet
- Objective-C
- Swift
TipConfig *config = [[TipConfig alloc] initWithCoordinates:CGPointMake(0, 0) width:100 duration:5 coordinateBase:BaseTopLeft];
let config = TipConfig(topLeftPoint: CGPoint(x: 0, y: 0), width: 100, duration: 5, coordinateBase: .topLeft)