PYQT5 Chinese File Dialog box QFILEDIALOG The solution to collapse after calling

2023-01-21   ES  

Floatingball (auxiliary button)

3 3 3 3 3 3 3 3

Function Description

  1. Lightweight UI control
  2. Auxiliary button/suspended ball (AssistiveTouch)
  3. Support two ways to stop and related custom settings

How to use

1. Simple initialization

UIImage *suspendedBallImage = [UIImage imageNamed:@"SuspendedBall"];
JhtFloatingBall *fb = [[JhtFloatingBall alloc] initWithFrame:CGRectMake(0, 20, suspendedBallImage.size.width * 0.65, suspendedBallImage.size.height * 0.65)];
fb.image = suspendedBallImage;
[self.view addSubview:fb];

2. How to suspend the ball stop

// How to stop
typedef NS_ENUM(NSInteger, Jht_StayMode) {
    // Stop surrounding (prefer to consider the left and right sides, the specific processing logic is the same as AssistiveTouch)
    stayMode_Around = 0,
    // Stop on the left side
    stayMode_OnlyLeft,
    // Pass on the right side
    stayMode_OnlyRight,
};

/** Suspension ball stopping method 
  * DEFAULT: STAYMODE_AROUND (prefer to consider the left and right sides, the specific processing logic is the same as AssistiveTouch) 
  * Please pay attention to the consistency of the starting point and the way to stop 
  */
@property (nonatomic, assign) Jht_StayMode stayMode;

3. Optional item

/** Do you need delay to change Alpha 
  * Default: Yes 
  */
@property (nonatomic, assign) BOOL shouldDelayChangeAlpha;
/** The transparency of the suspended ball stays (StayalPha> = 0, 1: opaque) 
  * default: opaque 
  */
@property (nonatomic, assign) CGFloat stayAlpha;
  • For details, see DEMO for details

source

Related Posts

Research thesis is used to optimize the invasion detection and unbalanced data concentration of the SMOTE ratio machine learning method (English paper)

javascript JS DIV layer drag (compatible with IE6, FF)

Apache Struts2 namespace remote command executes CVE-2018-11776 (S2-057) Vulnerability reappears Jerry

[Compulsory] Principles of artificial intelligence Learning Notes (1) Chapter1 Introduction

PYQT5 Chinese File Dialog box QFILEDIALOG The solution to collapse after calling

Random Posts

javascript’s thousands of points and remove thousands of points

html -mobile terminal

Make PDF template to achieve pdf file generation

Put “trouble” into the viewing board, open source free project management tools to help you!

Windows64 -bit system enters the debug mode