Resource Base
Table of contents

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
  1. @interface DSTipConfig : NSObject
    
  2. 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
  1. @property(nonatomic, assign) CGPoint topLeftPoint;
    
  2. var topLeftPoint: CGPoint { get set }
    

width

The width of the tip area.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) NSInteger width;
    
  2. var width: Int { get set }
    

duration

The duration of each tip message will be displayed.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) NSInteger duration;
    
  2. var duration: Int { get set }
    

coordinateBase

The coordinate base of the tip message.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) EnumCoordinateBase coordinateBase;
    
  2. var coordinateBase: EnumCoordinateBase { get set }
    

init

Create an instance of TipConfig with default configurations.

  • Objective-C
  • Swift
  1. - (instancetype)init;
    
  2. init()
    

Return Value

An instance of TipConfig.

Code Snippet

  • Objective-C
  • Swift
  1. TipConfig *config = [[TipConfig alloc] init];
    
  2. let config = TipConfig()
    

initWithCoordinates

Create an instance of TipConfig.

  • Objective-C
  • Swift
  1. - (instancetype)initWithCoordinates:(CGPoint)topLeftPoint
                             width:(NSInteger)width
                          duration:(NSInteger)duration
                  coordinateBase:(EnumCoordinateBase)coordinateBase;
    
  2. 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
  1. TipConfig *config = [[TipConfig alloc] initWithCoordinates:CGPointMake(0, 0) width:100 duration:5 coordinateBase:BaseTopLeft];
    
  2. let config = TipConfig(topLeftPoint: CGPoint(x: 0, y: 0), width: 100, duration: 5, coordinateBase: .topLeft)
    

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 4.x
      • Version 4.2.0
      • Version 4.0.2
      • Version 4.0.1
      • Version 4.0.0
    • Version 3.x
      • Version 3.0.3
      • Version 3.0.2
      • Version 3.0.1
      • Version 3.0.0
    • Version 2.x
      • Version 2.3.21
      • Version 2.3.20
      • Version 2.3.12
      • Version 2.3.11
      • Version 2.3.10
      • Version 2.3.5
      • Version 2.3.4
      • Version 2.3.3
      • Version 2.3.2
      • Version 2.3.1
      • Version 2.3.0
      • Version 2.1.4
      • Version 2.1.3
      • Version 2.1.1
      • Version 2.0.0
    Change +