Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Reusable control rounding setting method

A technology of rounded corners and rounded rectangles, which is applied in the field of application interface optimization, can solve problems such as no obvious impact on system performance, failure to give users a better experience, and interface freezes, so as to avoid a large amount of performance consumption, The effect of less memory space and avoiding interface freeze

Inactive Publication Date: 2018-06-12
WUHAN HONGXIN TECH SERVICE CO LTD
View PDF2 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The traditional rounding method of application control is to add rounding code in the source code of the application where the control needs to be rounded. The controls that need to be rounded include UIView, UIImageView, UIButton, UILable and UITextView and other visual controls; in the prior art, when setting the rounded corners of ordinary controls for a single interface, the layer layer CornerRadius and masksToBound attribute items are usually used to set them. This method has no effect on system performance when the number of rounded corners is relatively small. Obvious impact, but when the number of rounded corners is large, for example, when setting the rounded corners of the controls in the cells of the list interface, there will be obvious interface jamming; The problem of screen rendering cannot give users a better experience

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Reusable control rounding setting method
  • Reusable control rounding setting method
  • Reusable control rounding setting method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not constitute a conflict with each other.

[0028] figure 1 It is a flow chart of a reusable control rounding setting method provided by a specific embodiment of the present invention; figure 1 As shown, a reusable control rounding setting method provided by the present invention includes the following steps:

[0029] S1: In the classification folder of the project file, create a UIImage tool class, draw a rectangular picture with a hol...

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

PUM

No PUM Login to View More

Abstract

The invention discloses a reusable control rounding setting method. The method includes the following steps that S1, a tool class of UIImage is created, a rectangular image of which a central hollow-out pattern is a rounded rectangle is drawn through the UIImage, and cached in a system folder; wherein a drawing method includes the steps that S11, a drawn context is acquired, a drawn parameter is set, the drawn parameter comprises a line width and an inward reduction width; S12, an outer rectangle is drawn, and the size of the rectangular image is set; S13, a first rounded rectangle of the inner layer is drawn, and the size, rounding position and radius size of a circular bead of the first rounded rectangle are set; S4, the drawn context is ended to obtain the rectangular image of which thecentral hollow-out pattern is the rounded rectangle; S2, the rectangular image is called to overwrite the upper layer of a target control that needs to be rounded. According to the reusable control rounding setting method, by calling the pre-drawn and pre-cached rectangular image to carry out rounding processing on the target control, the problem of interface caton and off-screen rendering with alarge number of rounded corners in the prior art is solved.

Description

technical field [0001] The invention belongs to the technical field of application program interface optimization, and more specifically relates to a reusable control rounding setting method. Background technique [0002] Since the IOS 7 system, the flat design style has become popular all over the world. In the flat design, control rounding is one of the common ways to beautify the UI of the interface. Because of the visual comfort brought by the rounded corners, it makes Many APP development processes have the need to set rounded corners, and the emergence of IOS 11 reflects the importance of rounded corners for controls. [0003] The traditional rounding method of application control is to add rounding code in the source code of the application where the control needs to be rounded. The controls that need to be rounded include UIView, UIImageView, UIButton, UILable and UITextView and other visual controls; in the prior art, when setting the rounded corners of ordinary co...

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

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/38G06T11/20
CPCG06F8/38G06T11/20
Inventor 曹子仪陈峰惠磊刘俊鹏
Owner WUHAN HONGXIN TECH SERVICE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products