Method for efficiently realizing view fillet in iOS

A technology of rounded corners and views, applied in the field of view processing, can solve problems such as freezing, performance consumption, memory loss verification, etc., to achieve the effect of improving smoothness, reducing occupation size, and ensuring high efficiency
CN114153441APending Publication Date: 2022-03-08UNICLOUD (NANJING) DIGITAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN ยท China
Current Assignee / Owner
UNICLOUD (NANJING) DIGITAL TECH CO LTD
Publication Date
2022-03-08

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to a method for efficiently realizing a view fillet in an iOS. The method comprises the following steps: acquiring a context of a current view through a CoreGraphics drawing framework; drawing a fillet path of at least one included angle through UIBezierPath; a function drawing line in Core Graphics is used for drawing a fillet pattern through a fillet path obtained through UIBezierPath; and obtaining a fillet view through screenshot, and displaying the fillet view when the user views the fillet view. According to the scheme, the method for drawing the fillet through the CoreGraphics framework and the Bezier curve UIBezierPath has the advantages that the high efficiency of setting the fillet of the control by the view is ensured, the frequent calling of a GPU off-screen rendering mechanism is completely eradicated, and the operation lagging and the possible screen tearing feeling caused by off-screen rendering are avoided to the maximum extent, so that the product fluency and the user experience are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to the technical field of view processing, in particular to a method for efficiently realizing view rounded corners in iOS. Background technique

[0002] With the advent of the mobile Internet era, the importance of product user experience has been paid more and more attention, and rounded corners have been widely used in hardware and software design. This is because it is easier for human eyes to process rounded corners. Rounded corners have strong visual guidance and can more prominently highlight the content information in the view or card. At the same time, the design of rounded corners is also more secure and intimate, making products and graphics look more non-aggressive, and can bring a better user experience.

[0003] The way to add rounded corners to the control is to set the cornerRadius property to the layer of the view, for example, set it to:

[0004] self.view.layer.cornerRadius=10.0;

[0005] self.view.la...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More