Methods, devices, electric vehicles, and storage media for handling page text pop-ups

By generating text pop-ups using custom UI configuration files and view controller objects, the complexity of layout configuration for multiple languages ​​and variable text lengths in existing technologies is solved, achieving efficient text pop-up processing and multilingual switching, thus improving the user experience.

CN118708177BActive Publication Date: 2025-10-31CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410747792.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2025-10-31
Estimated Expiration
2044-06-11

AI Technical Summary

Technical Problem

Existing methods for designing page text pop-ups struggle to accurately design layouts that meet the needs of multiple languages, multiple lists, and text lengths, resulting in high layout complexity and insufficient usability.

Method used

By acquiring user-input language text data, and utilizing view controller objects and custom UI configuration files, text pop-ups are generated and displayed, including central or bottom pop-ups. The display style of elements and UI layout can be configured, the problem of excessively long text can be automatically handled, and multilingual switching is supported.

Benefits of technology

The processing flow of text pop-ups on the page has been optimized, improving layout configuration efficiency, reducing design difficulty and cost, enhancing the usability and ease of use of text pop-ups, and solving the problems of multilingual support and excessively long text length.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708177B_ABST
    Figure CN118708177B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, electric vehicle, and storage medium for processing text pop-ups on a webpage. The method includes: acquiring language text data; inputting the language text data into a view controller object of an application page; generating a text pop-up corresponding to the language text data through the view controller object according to a custom-configured UI profile; the UI profile defines the element display style and UI layout configuration of the text pop-up; the text pop-up includes a central pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page; and calling the view controller object's display pop-up method to display the text pop-up on the application page according to the element display style and UI layout configuration. This method allows for flexible configuration of central or bottom pop-ups on the application page, improving the usability and ease of use for layout configuration and language switching of text elements within the text pop-up.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle client technology, and in particular to a method for processing a page text pop-up, a device for processing a page text pop-up, an electric vehicle, a computer-readable storage medium, and a computer program product. Background Technology

[0002] With the rapid development of automotive electronics technology, in-vehicle applications are widely used in cars, and the development and use of in-vehicle application pages are receiving increasing attention. In the development of various in-vehicle application pages, issues often arise regarding details such as language switching and text arrangement in pop-up text boxes. Poor handling of these details can negatively impact the user experience.

[0003] In current page text pop-up design, designers typically need to optimize the design and layout of various functional controls within the pop-up based on actual business needs and user preferences. However, traditional application pop-up design methods often rely on the designer's experience and subjective judgment, manually laying out the pop-up view within existing design tools and rules. Furthermore, with the diversification and internationalization of in-vehicle applications, existing application pop-up design methods are increasingly struggling to accurately design layout configurations that meet requirements in situations involving multiple languages, multiple lists, and text lengths that are not fixed.

[0004] Therefore, existing pop-up design methods suffer from high layout configuration complexity and insufficient usability. Summary of the Invention

[0005] To address the aforementioned problems, this disclosure provides a method for processing page text pop-up boxes, a device for processing page text pop-up boxes, an electric vehicle, a computer-readable storage medium, and a computer program product. The technical solution of this disclosure is as follows:

[0006] According to a first aspect of the present disclosure, a method for processing a page text pop-up box is provided, including:

[0007] Obtain the language text data for the application page provided by the user;

[0008] The language text data is input into the view controller object of the application page, so that the view controller object generates a text pop-up corresponding to the language text data according to the custom-configured UI profile; the UI profile is used to define the element display style and UI layout configuration of the text pop-up; the text pop-up includes a middle pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page;

[0009] The view controller object's pop-up display method is invoked to display the text pop-up in the application page according to the element display style and the UI layout configuration; wherein the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range.

[0010] In one exemplary embodiment, generating a text pop-up corresponding to the language text data includes:

[0011] Obtain the page width of the application page, as well as the preset margin length, fixed width, and fixed height for the language text content;

[0012] Calculate the difference between the page width and twice the margin length, and use the smaller of the difference and the fixed width as the maximum allowed width of the language text content in the text pop-up box; and

[0013] The fixed height is passed into the preset sizeThatFits method to simulate and calculate the actual width of the language text content in the text pop-up box;

[0014] Based on the relationship between the actual width and the maximum allowed width, determine whether the length of the language text content exceeds the allowed length in the text pop-up box;

[0015] Based on the numberOfLines property of the text control in the text pop-up box, automatic line wrapping is performed for excessively long text content.

[0016] In one exemplary embodiment, the method of invoking the view controller object to display a pop-up box, according to the element display style and the UI layout configuration, to display the text pop-up box in the application page includes:

[0017] Based on the UIApplication singleton of the application to which the application page is applied, obtain the current main window of the application;

[0018] The root view controller of the current main window is determined based on the rootViewController property of the current main window;

[0019] Based on the presentedViewController property of the root view controller, determine whether the root view controller has already displayed other view controllers;

[0020] If the root view controller has already displayed other view controllers, call the present method of the root view controller to display the text pop-up box corresponding to the view controller object on the application page according to the preset pop-up attributes.

[0021] In one exemplary embodiment, the step of calling the present method of the root view controller to display a text pop-up box corresponding to the view controller object on the application page according to preset pop-up attributes includes:

[0022] The view controller object is passed as the first method parameter, the requirement data for whether animation is needed is passed as the second method parameter, and the preset callback closure data is passed as the third method parameter to the present method, so that the text pop-up box can be displayed in full screen on the application page through the present method.

[0023] In one exemplary embodiment, generating a text popup corresponding to the language text data through the view controller object according to a custom-configured UI profile includes:

[0024] Read the return value of the UI layout configuration file to obtain the total view applied to the application page;

[0025] If the text pop-up is a central pop-up, add a top view to the total view; or, if the text pop-up is a bottom pop-up, add a top view and a special options view to the total view.

[0026] Add a normal view and an action view to the top view; the normal view is used to load the title control and message control in the text pop-up, and the action view is used to load the option list in the text pop-up.

[0027] Based on the normal view and the action view, the layout of the title control, the message control and the option list are configured respectively to obtain the configured text pop-up box.

[0028] In an exemplary embodiment, configuring the layout of the title control, the message control, and the option list based on the normal view and the action view respectively includes:

[0029] Based on the normal view, the title control and message control in the middle pop-up and the bottom pop-up are configured to be arranged vertically;

[0030] Based on the action view, configure the option list in the bottom pop-up box to be arranged vertically;

[0031] Based on the action view and the number of options in the option list, the option list in the central pop-up is configured to be arranged vertically or horizontally.

[0032] In an exemplary embodiment, configuring the option list in the central pop-up to be arranged vertically or horizontally based on the action view and the number of options in the option list includes:

[0033] When the number is greater than two, the option list in the middle pop-up is configured to be arranged vertically based on the action view;

[0034] If the number of options is less than or equal to two, and the length of the language text content in each option is not excessive, the option list in the middle pop-up box is configured to be arranged horizontally based on the action view.

[0035] If the number of options is less than or equal to two, or if the length of the language text content in at least one of the options is excessively long, the option list in the central pop-up box will be configured to be arranged vertically based on the action view.

[0036] In one exemplary embodiment, generating a text popup corresponding to the language text data through the view controller object according to a custom-configured UI profile includes:

[0037] The UI configuration file is called to configure the style of each UI element in the text pop-up, resulting in a text pop-up with the style configured.

[0038] The style configuration includes combined style configuration types and single style configuration types;

[0039] The style configuration is used at least to configure the text font, font color, background color, border, and shadow to be displayed in each of the UI elements.

[0040] In one exemplary embodiment, before displaying the text pop-up in the application page according to the element display style and the UI layout configuration, the method further includes:

[0041] Set the default view of the view controller object to a semi-transparent gray background; the default view is used to simultaneously display the semi-transparent gray background in full screen when the text pop-up is displayed;

[0042] Add a fully transparent view between the top layer of the default view and the bottom layer of the total view of the application page, and add a preset click gesture and the corresponding response event of the click gesture to the fully transparent view;

[0043] The fully transparent view is used to trigger the response event when the bottom pop-up is displayed and a click gesture is received on the semi-transparent gray background; and not to trigger the response event when the middle pop-up is displayed and a click gesture is received on the semi-transparent gray background.

[0044] The response event is used to call the dismiss method to close the text pop-up.

[0045] In one exemplary embodiment, displaying the text pop-up in the application page according to the element display style and the UI layout configuration includes:

[0046] A preset rendering function is added to the interface layout control of the application page to display the text pop-up box on the application page based on the rendering function;

[0047] The input parameters of the rendering function include at least rounded corner data, background color data, and shadow data.

[0048] In one exemplary embodiment, displaying the text pop-up box on the application page based on the rendering function includes:

[0049] Obtain the system version of the program system used by the application page;

[0050] When the system version is the first type, the text pop-up is rendered and displayed based on the input parameter data of the rendering function;

[0051] When the system version is the second type, a subview is set based on the input parameter data of the rendering function, and the subview is inserted into the bottom layer of the stacked view where the interface layout control is located, so as to render and display the text pop-up based on the stacked view.

[0052] According to a second aspect of the present disclosure, a processing apparatus for a page text pop-up box is provided, comprising:

[0053] The data acquisition module is used to acquire the language text data of the application page passed in by the user;

[0054] The layout configuration module is used to input the language text data into the view controller object of the application page, so that the view controller object generates a text pop-up corresponding to the language text data according to the custom-configured UI configuration file; the UI configuration file is used to define the element display style and UI layout configuration of the text pop-up; the text pop-up includes a middle pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page;

[0055] A pop-up display module is used to call the pop-up display method of the view controller object to display the text pop-up in the application page according to the element display style and the UI layout configuration; wherein the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range.

[0056] According to a third aspect of the present disclosure, an electric vehicle is provided, comprising:

[0057] A processor and a memory connected to the processor, wherein the memory stores program data, and the processor is configured to retrieve the program data stored in the memory to implement the page text pop-up processing method as described in any of the preceding claims.

[0058] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium including program data, which, when executed by a processor of a computer device, enables the computer device to perform the page text pop-up processing method as described in any of the preceding claims.

[0059] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product including program instructions, which, when executed by a processor of a computer device, enable the computer device to perform the page text pop-up processing method as described in any of the preceding claims.

[0060] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:

[0061] On the one hand, this solution first inputs the user-provided language text data for the application page into the view controller object of the application page. This view controller object then configures the element display style and UI layout of the text popup according to a custom UI configuration file, generating a text popup corresponding to the language text data. Finally, the view controller object's popup display method is called to display the text popup on the application page. This optimizes the processing flow of the page's text popup, effectively improving the efficiency of text popup layout configuration and reducing the consumption of manpower and resources. On the other hand, this solution differs from existing layout configuration methods by using custom configuration... The UI configuration file allows for the configuration of element display style and UI layout for text pop-ups, enabling flexible generation of central pop-ups to be displayed in the middle of the application page or at the bottom of the application page. This effectively reduces the design difficulty and cost of page text pop-ups. Furthermore, with a fixed height and width within the maximum allowable width range, the design language text content is designed to have at least one line to solve the problem of incomplete display of language text content in cases of multiple languages, multiple lists, or excessively long text. This improves the usability and ease of use for configuring the layout of text elements and switching text languages ​​in text pop-ups, which is beneficial for the development and application of electric vehicles.

[0062] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is an application environment diagram illustrating a method for processing a page text pop-up according to an exemplary embodiment.

[0065] Figure 2 This is a flowchart illustrating a method for processing a page text pop-up according to an exemplary embodiment.

[0066] Figure 3 This is a flowchart illustrating a step of configuring a text pop-up according to an exemplary embodiment.

[0067] Figure 4 This is a page diagram illustrating a configured text pop-up according to an exemplary embodiment.

[0068] Figure 5 This is a page diagram illustrating a text pop-up box displayed in an application page according to an exemplary embodiment.

[0069] Figure 6 This is a page diagram illustrating the layout configuration of a title control, a message control, and an option list according to an exemplary embodiment.

[0070] Figure 7 This is a structural block diagram illustrating a page text pop-up processing device according to an exemplary embodiment.

[0071] Figure 8 This is a block diagram illustrating an electric vehicle for handling page text pop-ups according to an exemplary embodiment. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0073] The term "and / or" in the embodiments of this application refers to any and all possible combinations including one or more of the associated listed items. It should also be noted that, when used in this specification, "including / comprising" specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or components and / or groups thereof.

[0074] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0075] Furthermore, although the terms "first," "second," etc., are used repeatedly in this application to describe various operations (or various elements or various applications or various instructions or various data), these operations (or elements or applications or instructions or data) should not be limited by these terms. These terms are only used to distinguish one operation (or element or application or instruction or data) from another operation (or element or application or instruction or data).

[0076] The page text pop-up processing method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a communication network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other network servers.

[0077] In some embodiments, reference Figure 1 Server 104 obtains the language text data for the application page passed by the user; inputs the language text data into the view controller object of the application page, so that the view controller object generates a text pop-up corresponding to the language text data according to the custom-configured UI profile; the UI profile is used to define the element display style and UI layout configuration of the text pop-up; the text pop-up includes a middle pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page; the view controller object's display pop-up method is called to display the text pop-up in the application page according to the element display style and UI layout configuration; wherein, the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range.

[0078] In some embodiments, terminal 102 (such as a mobile terminal or a fixed terminal) can be implemented in various forms. Terminal 102 can be a mobile terminal including mobile phones, smartphones, laptops, portable handheld devices, personal digital assistants (PDAs), tablet computers (PADs), etc., or a fixed terminal including automated teller machines (ATMs), automated kiosks, digital TVs, desktop computers, fixed-line computers, etc.

[0079] Hereinafter, it is assumed that terminal 102 is a fixed terminal. However, those skilled in the art will understand that, if there are operations or elements specifically designed for mobile purposes, the construction according to the embodiments disclosed in this application can also be applied to mobile type terminal 102.

[0080] In some embodiments, the data processing component running on server 104 may load any of the various additional server applications and / or middleware applications being executed, such as HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol), CGI (Common Gateway Interface), RDBMS (Relational Database Management System), etc.

[0081] In some embodiments, server 104 may be implemented using a standalone server or a server cluster consisting of multiple servers. Server 104 may be adapted to run one or more application services or software components that provide the terminal 102 described in the foregoing disclosure.

[0082] In some embodiments, the operating system on which the application service or software component runs may include various versions of Microsoft Windows®, Apple Macintosh® and / or Linux operating systems, various commercial or UNIX-like® operating systems (including but not limited to various GNU / Linux operating systems, Google Chrome® OS, etc.) and / or mobile operating systems such as iOS®, Windows® Phone, Android® OS, BlackBerry® OS, Palm® OS, and other online or offline operating systems, without specific limitations herein.

[0083] In some embodiments, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating one embodiment of the method for processing page text pop-ups in this application, illustrating how this method is applied to... Figure 1 Taking server 104 as an example, the method includes the following steps:

[0084] Step S11: Obtain the language text data for the application page passed in by the user.

[0085] In one embodiment, the user prepares a data source containing language text data in advance and passes it into the configuration system to configure the layout of the text pop-up box on the application page.

[0086] In some embodiments, the data source may be implemented in various ways, including but not limited to files, databases, cloud storage, etc.

[0087] The data source can be stored as key-value pairs, a tree structure, a database table field, or a binary identifier, as long as it can be used by the program.

[0088] As an example, the language text data includes a title text: "Are you sure you want to enter the virtual vehicle control?", a message text: "You are about to enter the virtual owner experience mode. The vehicle control password is: 123456", and an option list. This option list includes Option 1 and Option 2. Option 1 is titled "Confirm," and its corresponding action is to redirect to the ... page; Option 2 is titled "Cancel," and its corresponding action is to redirect to the ... page. This text information can be passed in by each external caller, and the pop-up in this application can be used and rendered in an appropriate location.

[0089] Step S12: Input the language text data into the view controller object of the application page, so that the view controller object can generate a text pop-up corresponding to the language text data according to the custom-configured UI profile.

[0090] In one embodiment, the UI configuration file is used to define the element display style and UI layout configuration of the text popup.

[0091] In some embodiments, the UI configuration file can be pre-stored on a backend server, allowing it to be dynamically modified by the backend server and synchronized to the client. This enables the backend server to distribute different UI configuration files to clients based on different dimensions, such as country, region, language, user, and user habits.

[0092] In some embodiments, the UI configuration file can also be pre-stored on the client, so that each device has its own different configuration, so that: the backend server formulates the initial UI configuration file and sends it to the client, and the user can then personalize it. The personalized settings can also be synchronized to the server. The server only needs to perform orderly mapping and storage for different users or devices.

[0093] In one embodiment, the text pop-up includes a central pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page.

[0094] The layout of the middle pop-up is similar to that of the bottom pop-up, except that the bottom pop-up has an additional touch view for a special option. The server only needs to read the layout configuration in the UI configuration file to configure the text pop-up.

[0095] Specifically, the server reads the input parameter data passed by the user by reading the layout configuration module to obtain the pop-up style (type) to be configured, that is, whether the text pop-up to be configured is a middle pop-up or a bottom pop-up; and reads the layout parameters corresponding to the pop-up style in the UI configuration file.

[0096] The layout parameters can be key-value pairs, tree structures, database table fields, or binary identifiers, as long as they can be used by the program.

[0097] In some embodiments, when configuring a text popup, the basic UI components configured may include: a title control, a message control, an option list, and special options for the bottom popup.

[0098] The title control is divided into a data source and a non-essential control for displaying the title. The title control can be left unset, its data source is a string, and the control that displays the title needs to support line breaks.

[0099] The message control is divided into a data source and a non-essential control for displaying the message. The message control can be left unset, its data source is a string, and the control that displays the message needs to support line breaks.

[0100] The number of options in the option list is one or more, meaning there must be at least one option. The control that displays the option is the option control (Action).

[0101] In the bottom pop-up window, at least one special option must be available. If the external caller does not manually specify a special option, the last option in the list is selected as the special option.

[0102] In some embodiments, the options control (Action) stores various choices available to the user and consists of a regular UIView.

[0103] The option control primarily displays a non-mandatory title, meaning the option control can be left undefined. Its title consists of a data source and a control that displays the title. The data source is a string, and the control displaying the title supports line breaks.

[0104] The style configuration for the option control can include: background (such as solid color background, whether to blur the background, gradient background, etc.), text color, text font, and other configurations.

[0105] In one exemplary embodiment, see Figure 3 and Figure 4 , Figure 3 This is a flowchart illustrating an embodiment of configuring a text pop-up in this application. Figure 4 This is a schematic diagram of a page illustrating an embodiment of configuring a text pop-up in this application. In step S12, the server generates a text pop-up corresponding to the language text data using a view controller object according to a custom-configured UI profile. This specifically includes the following steps:

[0106] Step S121: Read the return value of the UI layout configuration file to obtain the total view applied to the application page.

[0107] At the very bottom of the application page is a total view, namely totalStackView. For example... Figure 4 As shown, the server can use the totalStackView call module to read the return value of the UI layout configuration file and obtain the total view and its related configuration information.

[0108] Step S122: If the text pop-up is a central pop-up, add a top view to the total view; or, if the text pop-up is a bottom pop-up, add a top view and a special options view to the total view.

[0109] Specifically, such as Figure 4 As shown, if the text pop-up to be configured is a middle pop-up, the server adds a top view (i.e., topStackView) as a subview in the total view; or, if the text pop-up to be configured is a bottom pop-up, the server adds a top view and a special options view as subviews in the total view.

[0110] Step S123: Add a normal view and an action view to the top view respectively.

[0111] Specifically, such as Figure 4 As shown, the server adds two subviews to the topStackView: a normal view (i.e., normalStackView) and an action view (i.e., actionStackView).

[0112] The normal view is used to load the title and message controls in the text popup, while the action view is used to load the option list in the text popup.

[0113] In some embodiments, the title control and message control can be freely combined; both can be present, neither can be present, or only one of them can be present.

[0114] In some embodiments, all instances of UIStackView in the application page are instances of UIStackView.

[0115] UIStackView is a UI layout control in iOS development used to arrange view elements in a stack-like manner, allowing multiple views to be grouped together horizontally or vertically. With UIStackView, developers can manage and layout UI elements more flexibly without manually calculating and setting the position and size of each view.

[0116] UIStackview can contain multiple subviews, including text labels, buttons, images, etc., and then automatically adjust the size and position of the subviews based on the set properties. Developers can control the spacing, alignment, and distribution of the subviews by setting its properties, thereby achieving different interface layout effects.

[0117] This involves using UIStackView to layout view elements within the application and switching the displayed text content based on the user's selected language. The multilingual functionality is achieved by placing text labels within the UIStackView and dynamically modifying the content of these labels according to the user's chosen language.

[0118] Step S124: Based on the normal view and the action view, configure the layout of the title control, message control and option list respectively to obtain the configured text pop-up.

[0119] Specifically, in the normalStackView, the server arranges the title control (i.e., title control) and message control (i.e., message control) horizontally or vertically; and in the actionStackView, it arranges the option list (i.e. action control) horizontally or vertically.

[0120] In one embodiment, the server generates a text pop-up corresponding to the language text data through a view controller object according to a custom-configured UI profile, including: calling the UI profile to configure the style of each UI element in the text pop-up, and obtaining the style-configured text pop-up.

[0121] Among them, style configuration is used to configure at least the text font, font color, background color, border and shadow of each UI element to be displayed.

[0122] In some embodiments, style configuration includes a combined style configuration type and a single style configuration type.

[0123] In some embodiments, the combined style configuration type is: to combine a series of elements to be displayed in the UI element, such as font, font color, background color, border, shadow, etc., to form a style for external use, such as: the inherent style of the cancel option, the inherent style of the confirm option, the inherent style of the normal option, and so on for other options.

[0124] In one embodiment, these combinations of configuration styles can be stored using enumerations, dictionaries, member attributes, etc., so that when UI elements are actually rendered, the actual drawing can be performed by looking up these stored data.

[0125] Specifically, the stored data format can be set as follows: for the cancel option, font size 14, font color red, background solid color gray, border rounded corners 12...; for the confirm option, font size 12, font color blue, background solid color white...; for the normal option, font size 12, font color black, background gradient: white-pink blue...

[0126] In another embodiment, for these combinations of configuration styles, elements such as font, font color, background color, border, and shadow can be separated, with the distinction made solely by the style configuration in their get methods. This allows the elements to be directly retrieved for actual rendering when the UI elements are actually rendered.

[0127] Specifically, the stored data format, for example, the font size can be set as: Cancel option - 14, Confirm option - 12, Normal option - 12, etc.; the font color can be set as: Cancel option - Red, Confirm option - Blue, Normal option - Black, etc.

[0128] In some embodiments, a single style configuration type refers to all settings used in this application. These can be added to a single style whenever there is an external requirement, and the combined styles can be updated simultaneously. Examples include title font, message font, color of each font, background color, border, shadow, etc. External callers can directly configure individual styles.

[0129] Step S13: Call the view controller object's display pop-up method to display the text pop-up in the application page according to the element display style and UI layout configuration.

[0130] Specifically, the server calls the show method of the view controller object to display the text pop-up in the application page according to the corresponding configured element display style (including combined style or single style) and UI layout configuration.

[0131] In one embodiment, the server calls the view controller object's pop-up display method to display a text pop-up in the application page according to the element display style and UI layout configuration, specifically including the following steps:

[0132] Step 1: Based on the UIApplication singleton of the application being used by the application page, obtain the current main window of the application.

[0133] Specifically, the server obtains the keywindow() method of the application's UIApplication singleton to get the application's current main window.

[0134] The current main window is referred to as the keywindow, which is the lowest-level window of an app.

[0135] UIApplication is a key class in iOS applications. It is a singleton class that represents the application itself. The UIApplication class is responsible for managing the application's lifecycle, handling system events, and coordinating communication and interaction between the various parts of the application.

[0136] In some embodiments, within the iOS UIKit framework, the UIApplication class provides a keyWindow property to return the current application's main window (key window). The keyWindow is the active, highest-level window in the current application, the window the user is currently interacting with. Typically, the keyWindow is the window containing the currently displayed content, such as the window containing the root view of the view controller that holds the user interface elements.

[0137] The `keyWindow` property of `UIApplication` allows developers to easily obtain a reference to the current main window, enabling them to access its content or perform window-related operations. For example, `keyWindow` can be used to retrieve the currently displayed view controller, or to obtain the size and position information of the current main window. `keyWindow` plays a crucial role in applications, helping developers manage and manipulate window-related content.

[0138] Step 2: Determine the root view controller of the current main window based on the rootViewController property of the current main window.

[0139] Specifically, the server calls the keywindow's system property rootViewController and recursively loops through it until it obtains its root view controller. This root view controller is referred to as the root ViewController, also known as VC-A.

[0140] In some embodiments, a ViewController is a controller object responsible for managing the display of the view and user interaction. It acts as an intermediary between the user interface and application logic, receiving user input and updating the view or performing other operations accordingly. By configuring the ViewController, functions such as page layout, content display, and user interaction responses can be implemented.

[0141] In some embodiments, the `rootViewController` property is a property of the `UIWindow` class in an iOS application, used to specify the root view controller of the window. Each `UIApplication` instance has a main window (usually the key window), and the main window contains a root view controller that is responsible for managing the main content of the application's interface.

[0142] By setting the rootViewController property of the main window, developers can designate a view controller as the root view controller of the application, making it the entry point for the entire application interface. Typically, the root view controller contains the application's home screen or the application's main navigation controller.

[0143] The advantage of setting the rootViewController property is that when the application starts, the system automatically adds the root view controller's view to the main window, thus establishing the initial state of the application's interface. The root view controller can also manage the switching and navigation of child view controllers, making the application's interface structure clearer and easier to manage.

[0144] In the specific implementation: Write a function that takes VC-A as the initial input parameter and checks within the function whether the input parameter is a parent ViewController. Specifically: First, check if it is a UITabBarController; if so, retrieve its currently selected child ViewController, recursively call this function, and pass the currently selected child ViewController as the new input parameter; if not, further check if it is a UINavigationController; if so, retrieve its currently visible child ViewController, recursively call this function, and pass the currently visible child ViewController as the new input parameter; if not, further check if its presentedViewController is null. If it is not null, it means that the one currently in front is a "pop-up ViewController," so this has been found, and the recursion stops, returning it; if it is null, return the input parameter. The input parameter at this point is the final "keywindow to get its root ViewController."

[0145] Step 3: Based on the root view controller's presentedViewController property, determine whether the root view controller has already displayed other view controllers.

[0146] In some embodiments, the `presentedViewController` property is defined in the `UIViewController` class and is used to obtain another view controller that is modally presented by the current view controller. When one view controller modally presents another view controller, the presented view controller becomes the `presentedViewController` of the `presentingViewController`. The purpose of this property is to facilitate developers in establishing modal presentation relationships between view controllers and to allow developers to access the modally presented controller and perform corresponding operations or processing, such as dismissing the modal presentation.

[0147] When a view controller is presented modally, the presented view controller can be retrieved through the presentedViewController property. When multiple view controllers are presented, each view controller may have its own presentedViewController.

[0148] Specifically, the server calls the system property presentedViewController of the root ViewController and obtains the corresponding return value.

[0149] Specifically, this return value indicates whether the root ViewController has already displayed other view controllers. If this return value is not empty, it means that other view controllers have already been displayed. Therefore, the layout ViewController in this application will further display the text pop-up corresponding to the view controller object on this displayed view controller.

[0150] Step 4: If the root view controller has already displayed other view controllers, call the root view controller's present method to display the text pop-up corresponding to the view controller object in the application page according to the preset pop-up properties.

[0151] Specifically, the server calls the system function `present` of the root ViewController of the current main window to display a text pop-up in the application page according to preset pop-up properties.

[0152] In some embodiments, calling the system function present(_:animated:completion:) of the root view controller of the current window is used to modally display a pop-up (UIAlertController or a custom view controller).

[0153] The specific steps of this function method are as follows:

[0154] First, obtain the root view controller of the current window, which is obtained through the rootViewController property of the main window.

[0155] Then, use the present(_:animated:completion:) method on the root view controller. Pass the view controller instance to be displayed as the first parameter, set whether to display animation in the second parameter, and set the callback closure after the display is completed in the third parameter.

[0156] When the present method is called, the specified view controller will pop up and be displayed on the current window, allowing the user to interact with the displayed view.

[0157] After the user finishes interacting with the pop-up, they can close it by calling the pop-up's dismiss method.

[0158] In some embodiments, the preset pop-up property can be to set the pop-up property of the layout ViewController to full screen, thereby setting the system property modalPresentationStyle of the layout ViewController to .overCurrentContext.

[0159] In some embodiments, by calling the present function and passing in the corresponding parameters, a new view controller can be presented in an iOS application, thereby realizing the function of pop-up boxes or switching views.

[0160] In one embodiment, the server calls the present method of the root view controller to display a text pop-up corresponding to the view controller object in the application page according to preset pop-up attributes. This includes passing the view controller object as a first method parameter, the requirement data for whether animation is needed as a second method parameter, and preset callback closure data as a third method parameter into the present method, so as to display the text pop-up in full screen in the application page through the present method.

[0161] In one embodiment, the present function is used as follows:

[0162] open func present(_ viewControllerToPresent: UIViewController, animated flag: Bool, completion: (() -> Void)? = nil).

[0163] The function accepts three parameters: "viewControllerToPresent" is the view controller object to be presented (i.e., the layout ViewController); "animated" is a boolean value of false or true that is passed in according to business requirements, which indicates whether there should be an animation effect during the presentation process; and "completion" is an optional closure that indicates the operation to be performed after the presentation is completed.

[0164] In one embodiment, the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range.

[0165] Specifically, the language text content in each text control of the text pop-up box has at least one line, so that the display height corresponding to each line of language text content is a preset fixed height, and the display width is within the maximum allowed width range.

[0166] In one exemplary embodiment, see Figure 5 , Figure 5 This is a schematic diagram of an embodiment of displaying a text pop-up box on an application page, as described in this application. Figure 5 As shown in Figure a, in the bottom pop-up window, the length of the language text content in the option list exceeds the limit. Therefore, the number of lines for the language text content can be set to a maximum, ensuring that the display height of the language text content in the option list is a preset fixed height, and the display width is within the maximum allowed width range. For example... Figure 5 As shown in b, in the middle pop-up box, the length of the language text content of the title control, message control, and option list all exceeds the limit. Therefore, the number of lines of their language text content can be set to a maximum of lines, so that the display height of the language text content of the title control, message control, and option list is a preset fixed height, and the display width is within the maximum allowed width range.

[0167] The above solution, on the one hand, first inputs the user-provided language text data for the application page into the view controller object of the application page. This view controller object then configures the element display style and UI layout of the text popup according to a custom UI configuration file, generating a text popup corresponding to the language text data. Finally, it calls the view controller object's popup display method to show the text popup on the application page, thus optimizing the text popup processing flow, effectively improving the efficiency of text popup layout configuration, and reducing the consumption of manpower and resources. On the other hand, this solution, unlike existing layout configuration methods, uses a custom... The configured UI profile allows for the customization of element display style and UI layout for text pop-ups. This enables the flexible generation of central pop-ups to be displayed in the middle of the application page or at the bottom of the application page, effectively reducing the design difficulty and cost of page text pop-ups. Furthermore, with a fixed height and width within the maximum allowable range, the design language text content is limited to at least one line to address the issue of incomplete display of language text content in cases of multiple languages, multiple lists, or excessively long text. This improves the usability and ease of use for configuring the layout of text elements and switching text languages ​​in text pop-ups, which is beneficial for the development and application of electric vehicles.

[0168] Those skilled in the art will understand that the methods disclosed in the above-described specific embodiments can be implemented in more concrete ways. For example, the implementation described above, in which the server calls the view controller object to display a pop-up box to display a text pop-up box in the application page according to the element display style and UI layout configuration, is merely illustrative.

[0169] In one exemplary embodiment, the server generates a text pop-up box corresponding to the language text data, which may further include the following steps:

[0170] Step 1: Obtain the page width of the application page, as well as the preset margin length, fixed width, and fixed height for the language text content.

[0171] Here, the page width is the screen width of the display screen where the application is located, the margin length is the distance between the language text content displayed in the pop-up box and the two sides of the display screen, the fixed width is a default width preset for the language text content in the text pop-up box, and the fixed height is a default height preset for the language text content in the text pop-up box.

[0172] Step 2: Calculate the difference between the page width and twice the fixed width, and use the smaller value between the difference and the fixed width as the maximum allowed width of the language text content in the text pop-up box; and pass the fixed height into the preset sizeThatFits method to simulate the calculation of the actual width of the language text content in the text pop-up box.

[0173] Specifically, on one hand, the server uses the formula: min(page width - twice the margin length, a fixed width) to determine the maximum allowable width of the language text content in the text popup. On the other hand, the server creates a UILabel instance whose text-related properties are set to be completely consistent with those of the option control, such as font (font property), text (text property or attributedText property), line break (lineBreakMode property), etc. Then, using the fixed height as input data, the server calls the sizeThatFits function on it, setting the width to infinity, thereby calculating the actual width of the language text content in the text popup.

[0174] In one embodiment, the `sizeThatFits` function, used to design the width of text content, is a function that calculates the required width of the text content. Specifically, a fixed line height is passed to the `sizeThatFits` function as input data, and the width is set to infinity to determine the actual width of the option text within a single line. By using the `sizeThatFits` function, the presentation of text content can be more precise and aesthetically pleasing, improving the user experience.

[0175] The `sizeThatFits` function is a method of the `UIView` class in the UIKit framework. It calculates the size of a view to fit the content of its child views. This method returns an optimal size that ensures the view can contain its child views and dynamically adjusts based on the size of the content. Typically, the `sizeThatFits` method is called before laying out child views to determine the optimal size and ensure that content does not overflow or get truncated.

[0176] When using this method, developers can specify a size range as a parameter to ensure that the calculated optimal size falls within that range. Developers can also override the `sizeThatFits` method in subclasses to customize the view's size calculation logic according to specific layout requirements. By calling the `sizeThatFits` method, developers can better control the view's size and ensure that the view displays its content correctly.

[0177] Step 3: Based on the relationship between the actual width and the maximum allowed width, determine whether the length of the language text content exceeds the allowed length in the text pop-up box.

[0178] Specifically, the server compares the actual width of the text with the maximum allowed width. If the actual width is greater than the maximum allowed width, the server returns a message indicating that the text is too long; if the actual width is less than or equal to the maximum allowed width, the server returns a message indicating that the text is not too long.

[0179] Step 4: Based on the numberOfLines property of the text control in the text pop-up, automatically wrap any excessively long text content.

[0180] The text controls in the text pop-up include title controls and message controls in the middle and bottom pop-ups.

[0181] In some embodiments, the numberOfLines property of each text control in the text pop-up is set to 0 in advance, which means that line breaks are supported, so that when the language text content is too long, the language text content can be automatically wrapped.

[0182] In an exemplary embodiment, the server configures the layout of the title control, message control, and option list based on the normal view and the action view, and may further include the following steps:

[0183] Step 1: Based on the normal view, configure the title and message controls in the middle and bottom pop-ups to be arranged vertically.

[0184] Specifically, the title control and message control are subviews of normalStackView. The server can set the arrangement of the title control and message control in the normalStackView of the middle pop-up and the bottom pop-up to vertical (.vertical).

[0185] Step 2: Based on the action view, configure the option list in the bottom pop-up to be arranged vertically.

[0186] Specifically, the server can set the arrangement of the option list to vertical (.vertical) in the actionStackView of the bottom pop-up.

[0187] Step 3: Based on the action view and the number of options in the option list, configure the option list in the middle pop-up to be arranged vertically or horizontally.

[0188] In one embodiment, the server configures the option list in the central pop-up window to be arranged vertically or horizontally, including: when there are more than two options, configuring the option list in the central pop-up window to be arranged vertically based on the action view.

[0189] Specifically, if the number of options in the option list is greater than 2, the server can set the arrangement of the option list to vertical (.vertical) in the actionStackView of the pop-up window in the middle.

[0190] In another embodiment, the server configures the option list in the central pop-up window to be arranged vertically or horizontally, including: when the number of options is less than or equal to two, and the length of the language text content in each option is not excessive, configuring the option list in the central pop-up window to be arranged horizontally based on the action view.

[0191] Specifically, if the number of options in the option list is ≤2, and the length of the language text content in each option is not excessive, the server can set the arrangement of the option list to horizontal (.horizontal) in the actionStackView of the pop-up window.

[0192] In another embodiment, the server configures the option list in the central pop-up to be arranged vertically or horizontally, including: when the number of options is less than or equal to two, and when the length of the language text content in at least one option is excessively long, configuring the option list in the central pop-up to be arranged vertically based on the action view.

[0193] Specifically, if the number of options in the option list is less than or equal to 2, and at least one of the options contains language text that is too long, the server can set the arrangement of the option list to vertical (.vertical) in the actionStackView of the pop-up window.

[0194] In one exemplary embodiment, see Figure 6 , Figure 6 This is a schematic diagram of a page illustrating an embodiment of the layout configuration of a title control, message control, and option list in this application. Figure 6 As shown in Figure a, in the pop-up window in the middle, set the arrangement of the title control and message control to vertical, and set the arrangement of the two options in the option list to horizontal. For example... Figure 6 As shown in b, in the bottom pop-up window, set the arrangement of the four options in the option list to vertical, and set the arrangement of the "Cancel" option in the special options to be vertical to the option list. Figure 6 As shown in c, in the bottom pop-up box, set the arrangement of the title control and message control to vertical, set the arrangement of the two options in the option list to vertical, and set the arrangement of the "Cancel" option in the special options to be vertical with the option list.

[0195] In one exemplary embodiment, before the server displays the text pop-up in the application page according to the element display style and UI layout configuration, the process may further include the following steps:

[0196] Step 1: Set the default view of the view controller object to a semi-transparent gray background.

[0197] In the specific implementation, the server modifies the default view of the layout ViewController to set it to a semi-transparent gray background, so that when the text dialog box pops up, there will be a full-screen semi-transparent gray background.

[0198] The default view is used to simultaneously display a semi-transparent gray background in full screen when a text pop-up is displayed.

[0199] Step 2: Add a fully transparent view between the top layer of the default view and the bottom layer of the application page's total view, and add preset click gestures and corresponding response events to the fully transparent view.

[0200] In the specific implementation, the server adds a fully transparent view in the middle position between the default view of the layout ViewController and the bottom of the totalStackView, and sets its size to be the same as the screen.

[0201] In some embodiments, a click gesture and a response event are added to this fully transparent view, wherein the response event can be: closing the text pop-up.

[0202] In one exemplary embodiment, the fully transparent view is configured to trigger a response event when a pop-up is displayed at the bottom and a click gesture is received on the semi-transparent gray background; and not to trigger a response event when a pop-up is displayed in the middle and a click gesture is received on the semi-transparent gray background.

[0203] Specifically, this fully transparent view allows the middle pop-up to not collapse when the user clicks on the semi-transparent gray background of the application page, while the bottom pop-up can collapse when the user clicks on the semi-transparent gray background of the application page.

[0204] In some embodiments, the response event is used to invoke the dismiss method to close the text popup.

[0205] In one exemplary embodiment, the server displays a text pop-up in the application page according to the element display style and UI layout configuration, including: adding a preset rendering function to the interface layout control of the application page to display the text pop-up in the application page based on the rendering function.

[0206] Specifically, a preset rendering function is added to the UI layout control (i.e., UIStackView) of the application page, so that when the text pop-up is displayed, the rendering function is called to display the text pop-up on the application page.

[0207] In one embodiment, the server displays a text pop-up in the application page based on a rendering function, including: obtaining the system version of the program system used by the application page; if the system version is a first type of version, rendering and displaying the text pop-up based on the input parameter data of the rendering function; or, if the system version is a second type of version, setting a subview based on the input parameter data of the rendering function, and inserting the subview into the bottom layer of the stacked view where the interface layout controls are located, so as to render and display the text pop-up based on the stacked view.

[0208] In some embodiments, the input parameters of the rendering function include at least rounded corner data, background color data, and shadow data; the return value of the rendering function is none.

[0209] In some embodiments, the function logic of the rendering function is as follows: First, obtain the system version of the application system used by the application page; then, if the system version is a first type of version (e.g., a version after iOS 13), render and display the text pop-up based on the input parameter data of the rendering function; if the system version is a second type of version (e.g., a version of iOS 13 and earlier), set a subview based on the input parameter data of the rendering function, and insert the subview into the bottom layer of the stacked view where the interface layout controls are located, so as to render and display the text pop-up based on the stacked view.

[0210] In this way, on the one hand, this solution first inputs the user-provided language text data for the application page into the view controller object of the application page. This view controller object then configures the element display style and UI layout of the text popup according to a custom UI configuration file, generating a text popup corresponding to the language text data. Finally, the view controller object's popup display method is called to display the text popup on the application page. This optimizes the processing flow of the page's text popup, effectively improving the efficiency of text popup layout configuration and reducing the consumption of manpower and resources. On the other hand, this solution, unlike existing layout configuration methods, uses a custom configuration... The system allows for the configuration of element display styles and UI layouts for text pop-ups, enabling flexible generation of central pop-ups to be displayed in the middle of the application page or at the bottom of the application page. This effectively reduces the design difficulty and cost of page text pop-ups. Furthermore, with a fixed height and width within the maximum allowable range, the system ensures that the language text content is displayed in at least one line to address the issue of incomplete display of language text content in cases involving multiple languages, multiple lists, or excessively long texts. This improves the usability and ease of use for configuring the layout of text elements and switching text languages ​​in text pop-ups, which is beneficial for the development and application of electric vehicles.

[0211] It should be understood that, although Figures 2-6 The steps in the accompanying diagrams are shown sequentially as indicated by the arrows; however, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise expressly stated herein, there is no strict order in which these steps are performed, and they can be performed in other orders. Furthermore, Figures 2-6 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0212] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0213] Figure 7 This is a structural block diagram of a page text pop-up processing device provided in an embodiment of this application. (Refer to...) Figure 7 The processing device 10 for the text pop-up on the page includes: a data acquisition module 11, a layout configuration module 12, and a pop-up display module 13.

[0214] The data acquisition module 11 is used to acquire language text data for the application page input by the user.

[0215] The layout configuration module 12 is used to input the language text data into the view controller object of the application page, so that the view controller object generates a text pop-up corresponding to the language text data according to the custom-configured UI configuration file; the UI configuration file is used to define the element display style and UI layout configuration of the text pop-up; the text pop-up includes a middle pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page;

[0216] The pop-up display module 13 is used to call the pop-up display method of the view controller object to display the text pop-up in the application page according to the element display style and the UI layout configuration; wherein the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range.

[0217] In one embodiment, in generating the text pop-up corresponding to the language text data, the processing device 10 for the page text pop-up is further configured to perform:

[0218] Obtain the page width of the application page, as well as the preset margin length, fixed width, and fixed height for the language text content;

[0219] Calculate the difference between the page width and twice the margin length, and use the smaller of the difference and the fixed width as the maximum allowed width of the language text content in the text pop-up box; and

[0220] The fixed height is passed into the preset sizeThatFits method to simulate and calculate the actual width of the language text content in the text pop-up box;

[0221] Based on the relationship between the actual width and the maximum allowed width, determine whether the length of the language text content exceeds the allowed length in the text pop-up box;

[0222] Based on the numberOfLines property of the text control in the text pop-up box, automatic line wrapping is performed for excessively long text content.

[0223] In one embodiment, in the aspect of the method for displaying a pop-up by invoking the view controller object to display the text pop-up in the application page according to the element display style and the UI layout configuration, the page text pop-up processing device 10 is further configured to perform:

[0224] Based on the UIApplication singleton of the application to which the application page is applied, obtain the current main window of the application;

[0225] The root view controller of the current main window is determined based on the rootViewController property of the current main window;

[0226] Based on the presentedViewController property of the root view controller, determine whether the root view controller has already displayed other view controllers;

[0227] If the root view controller has already displayed other view controllers, call the present method of the root view controller to display the text pop-up box corresponding to the view controller object on the application page according to the preset pop-up attributes.

[0228] In one embodiment, in the aspect of calling the present method of the root view controller to display the text pop-up corresponding to the view controller object on the application page according to preset pop-up attributes, the page text pop-up processing device 10 is further configured to perform:

[0229] The view controller object is passed as the first method parameter, the requirement data for whether animation is needed is passed as the second method parameter, and the preset callback closure data is passed as the third method parameter to the present method, so that the text pop-up box can be displayed in full screen on the application page through the present method.

[0230] In one embodiment, in the aspect of generating a text pop-up corresponding to the language text data according to a custom-configured UI profile via the view controller object, the page text pop-up processing device 10 is further configured to perform:

[0231] Read the return value of the UI layout configuration file to obtain the total view applied to the application page;

[0232] If the text pop-up is a central pop-up, add a top view to the total view; or, if the text pop-up is a bottom pop-up, add a top view and a special options view to the total view.

[0233] Add a normal view and an action view to the top view; the normal view is used to load the title control and message control in the text pop-up, and the action view is used to load the option list in the text pop-up.

[0234] Based on the normal view and the action view, the layout of the title control, the message control and the option list are configured respectively to obtain the configured text pop-up box.

[0235] In one embodiment, in the aspect of configuring the layout of the title control, the message control, and the option list based on the normal view and the action view, the page text pop-up processing device 10 is further configured to perform:

[0236] Based on the normal view, the title control and message control in the middle pop-up and the bottom pop-up are configured to be arranged vertically;

[0237] Based on the action view, configure the option list in the bottom pop-up box to be arranged vertically;

[0238] Based on the action view and the number of options in the option list, the option list in the central pop-up is configured to be arranged vertically or horizontally.

[0239] In one embodiment, regarding configuring the option list in the central pop-up box to be arranged vertically or horizontally based on the number of options in the action view and the option list, the page text pop-up box processing device 10 is further configured to perform:

[0240] When the number is greater than two, the option list in the middle pop-up is configured to be arranged vertically based on the action view;

[0241] If the number of options is less than or equal to two, and the length of the language text content in each option is not excessive, the option list in the middle pop-up box is configured to be arranged horizontally based on the action view.

[0242] If the number of options is less than or equal to two, or if the length of the language text content in at least one of the options is excessively long, the option list in the central pop-up box will be configured to be arranged vertically based on the action view.

[0243] In one embodiment, in the aspect of generating a text pop-up corresponding to the language text data according to a custom-configured UI profile via the view controller object, the page text pop-up processing device 10 is further configured to perform:

[0244] The UI configuration file is called to configure the style of each UI element in the text pop-up, resulting in a text pop-up with the style configured.

[0245] The style configuration includes combined style configuration types and single style configuration types;

[0246] The style configuration is used at least to configure the text font, font color, background color, border, and shadow to be displayed in each of the UI elements.

[0247] In one embodiment, before displaying the text pop-up in the application page according to the element display style and the UI layout configuration, the text pop-up processing device 10 is further configured to perform:

[0248] Set the default view of the view controller object to a semi-transparent gray background; the default view is used to simultaneously display the semi-transparent gray background in full screen when the text pop-up is displayed;

[0249] Add a fully transparent view between the top layer of the default view and the bottom layer of the total view of the application page, and add a preset click gesture and the corresponding response event of the click gesture to the fully transparent view;

[0250] The fully transparent view is used to trigger the response event when the bottom pop-up is displayed and a click gesture is received on the semi-transparent gray background; and not to trigger the response event when the middle pop-up is displayed and a click gesture is received on the semi-transparent gray background.

[0251] The response event is used to call the dismiss method to close the text pop-up.

[0252] In one embodiment, in the aspect of displaying the text pop-up in the application page according to the element display style and the UI layout configuration, the text pop-up processing device 10 is further configured to perform:

[0253] A preset rendering function is added to the interface layout control of the application page to display the text pop-up box on the application page based on the rendering function;

[0254] The input parameters of the rendering function include at least rounded corner data, background color data, and shadow data.

[0255] In one embodiment, in the aspect of displaying the text pop-up box on the application page based on the rendering function, the page text pop-up box processing device 10 is further configured to perform:

[0256] Obtain the system version of the program system used by the application page;

[0257] When the system version is the first type, the text pop-up is rendered and displayed based on the input parameter data of the rendering function;

[0258] When the system version is the second type, a subview is set based on the input parameter data of the rendering function, and the subview is inserted into the bottom layer of the stacked view where the interface layout control is located, so as to render and display the text pop-up based on the stacked view.

[0259] Figure 8 This is a block diagram of an electric vehicle provided in an embodiment of this application. (Refer to...) Figure 8 The electric vehicle includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores mileage and maintenance data. The I / O interfaces allow the processor to exchange information with external devices. The communication interface allows communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the page text pop-up processing method described above.

[0260] In some embodiments, the electric vehicle is an electronic device whose computing system can run one or more operating systems, including any of the operating systems discussed above and any commercially available server operating system. The electric vehicle can also run any of a variety of additional server applications and / or middleware applications, including HTTP (Hypertext Transfer Protocol) servers, FTP (File Transfer Protocol) servers, CGI (Common Gateway Interface) servers, super servers, database servers, etc. Exemplary database servers include, but are not limited to, commercially available database servers from companies such as IBM.

[0261] In some embodiments, the processor typically controls the overall operation of the electric vehicle, such as operations associated with display, data processing, data communication, and recording. The processor may include one or more processor components to execute computer programs to perform all or part of the steps of the methods described above. Furthermore, the processor component may include one or more modules to facilitate interaction between the processor component and other components. For example, the processor component may include a multimedia module to facilitate control of the interaction between the user's electric vehicle and the processor using multimedia components.

[0262] This application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the page text pop-up processing method described above.

[0263] If the integrated units of the various functional units in the various embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer-readable storage medium includes several instructions in a computer program to cause a computer device (which may be a personal computer, system server, or network device, etc.), an electronic device (e.g., MP3, MP4, etc., or a mobile phone, tablet computer, wearable device, etc., or a desktop computer, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of this application.

[0264] This application provides a computer program product. The computer program product includes program instructions that can be executed by a processor of an electric vehicle to implement the page text pop-up processing method described above.

[0265] Those skilled in the art will understand that embodiments of this application can provide a method for processing page text pop-ups, a device for processing page text pop-ups, an electric vehicle, a computer-readable storage medium, or a computer program product. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer program instructions (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0266] This application is described with reference to flowchart illustrations and / or block diagrams of a page text pop-up processing method, a page text pop-up processing apparatus, an electric vehicle, a computer-readable storage medium, or a computer program product according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by the computer program product. These computer program products can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that program instructions executable by the processor of the computer or other programmable data processing apparatus generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0267] These computer program products may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that program instructions stored in the computer program product produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0268] These program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing program instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0269] It should be noted that the various methods, apparatuses, electronic devices, computer-readable storage media, computer program products, etc. described above may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.

[0270] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0271] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for processing a text pop-up box on a webpage, characterized in that, The method includes: Obtain the language text data for the application page provided by the user; The language text data is input into the view controller object of the application page, so that the view controller object generates a text pop-up corresponding to the language text data according to the custom-configured UI profile; the UI profile is used to define the element display style and UI layout configuration of the text pop-up; the text pop-up includes a middle pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page; The view controller object's pop-up display method is invoked to display the text pop-up in the application page according to the element display style and the UI layout configuration; wherein the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range; The step of displaying the text pop-up in the application page according to the element display style and the UI layout configuration includes: adding a preset rendering function to the interface layout control of the application page to call the rendering function to obtain the system version of the program system applied to the application page; if the system version is a first type of version, rendering and displaying the text pop-up based on the input parameter data of the rendering function; if the system version is a second type of version, setting a subview based on the input parameter data of the rendering function, and inserting the subview into the bottom layer of the stacked view where the interface layout control is located, so as to render and display the text pop-up based on the stacked view; wherein, the first type of version is a version after iOS 13, and the second type of version is a version of iOS 13 and earlier than iOS 13.

2. The method according to claim 1, characterized in that, The generation of the text pop-up corresponding to the language text data includes: Obtain the page width of the application page, as well as the preset margin length, fixed width, and fixed height for the language text content; Calculate the difference between the page width and twice the margin length, and use the smaller of the difference and the fixed width as the maximum allowed width of the language text content in the text pop-up box; and The fixed height is passed into the preset sizeThatFits method to simulate and calculate the actual width of the language text content in the text pop-up box; Based on the relationship between the actual width and the maximum allowed width, determine whether the length of the language text content exceeds the allowed length in the text pop-up box; Based on the numberOfLines property of the text control in the text pop-up box, automatic line wrapping is performed for excessively long text content.

3. The method according to claim 2, characterized in that, The method for calling the view controller object to display the pop-up box, in accordance with the element display style and the UI layout configuration, to display the text pop-up box on the application page includes: Based on the UIApplication singleton of the application to which the application page is applied, obtain the current main window of the application; The root view controller of the current main window is determined based on the rootViewController property of the current main window; Based on the presentedViewController property of the root view controller, determine whether the root view controller has already displayed other view controllers; If the root view controller has already displayed other view controllers, call the present method of the root view controller to display the text pop-up box corresponding to the view controller object on the application page according to the preset pop-up attributes.

4. The method according to claim 3, characterized in that, The step of calling the present method of the root view controller to display the text pop-up corresponding to the view controller object on the application page according to preset pop-up attributes includes: The view controller object is passed as the first method parameter, the requirement data for whether animation is needed is passed as the second method parameter, and the preset callback closure data is passed as the third method parameter to the present method, so that the text pop-up box can be displayed in full screen on the application page through the present method.

5. The method according to claim 1, characterized in that, The step of generating a text popup corresponding to the language text data through the view controller object according to the custom-configured UI profile includes: Read the return value of the UI layout configuration file to obtain the total view applied to the application page; If the text pop-up is a central pop-up, add a top view to the total view; or, if the text pop-up is a bottom pop-up, add a top view and a special options view to the total view. Add a normal view and an action view to the top view; the normal view is used to load the title control and message control in the text pop-up, and the action view is used to load the option list in the text pop-up. Based on the normal view and the action view, the layout of the title control, the message control and the option list are configured respectively to obtain the configured text pop-up box.

6. The method according to claim 5, characterized in that, The layout configuration of the title control, the message control, and the option list based on the normal view and the action view includes: Based on the normal view, the title control and message control in the middle pop-up and the bottom pop-up are configured to be arranged vertically; Based on the action view, configure the option list in the bottom pop-up box to be arranged vertically; Based on the action view and the number of options in the option list, the option list in the central pop-up is configured to be arranged vertically or horizontally.

7. The method according to claim 6, characterized in that, The step of configuring the option list in the central pop-up to be arranged vertically or horizontally based on the action view and the number of options in the option list includes: When the number is greater than two, the option list in the middle pop-up is configured to be arranged vertically based on the action view; If the number of options is less than or equal to two, and the length of the language text content in each option is not excessive, the option list in the middle pop-up box is configured to be arranged horizontally based on the action view. If the number of options is less than or equal to two, or if the length of the language text content in at least one of the options is excessively long, the option list in the central pop-up box will be configured to be arranged vertically based on the action view.

8. The method according to claim 1, characterized in that, The step of generating a text popup corresponding to the language text data through the view controller object according to the custom-configured UI profile includes: The UI configuration file is called to configure the style of each UI element in the text pop-up, resulting in a text pop-up with the style configured. The style configuration includes combined style configuration types and single style configuration types; The style configuration is used at least to configure the text font, font color, background color, border, and shadow to be displayed in each of the UI elements.

9. The method according to claim 8, characterized in that, Before displaying the text pop-up in the application page according to the element display style and the UI layout configuration, the method further includes: Set the default view of the view controller object to a semi-transparent gray background; the default view is used to simultaneously display the semi-transparent gray background in full screen when the text pop-up is displayed; Add a fully transparent view between the top layer of the default view and the bottom layer of the total view of the application page, and add a preset click gesture and the corresponding response event of the click gesture to the fully transparent view; The fully transparent view is used to trigger the response event when the bottom pop-up is displayed and a click gesture is received on the semi-transparent gray background; and not to trigger the response event when the middle pop-up is displayed and a click gesture is received on the semi-transparent gray background. The response event is used to call the dismiss method to close the text pop-up.

10. The method according to claim 1, characterized in that, in, The input parameters of the rendering function include at least rounded corner data, background color data, and shadow data.

11. A processing device for a page text pop-up box, characterized in that, The device includes: The data acquisition module is used to acquire the language text data of the application page passed in by the user; The layout configuration module is used to input the language text data into the view controller object of the application page, so that the view controller object generates a text pop-up corresponding to the language text data according to the custom-configured UI configuration file; the UI configuration file is used to define the element display style and UI layout configuration of the text pop-up; the text pop-up includes a middle pop-up to be displayed in the middle of the application page, or a bottom pop-up at the bottom of the application page; A pop-up display module is used to call the pop-up display method of the view controller object to display the text pop-up in the application page according to the element display style and the UI layout configuration; wherein, the text pop-up includes at least one line of language text content with a fixed height and a width within the maximum allowed width range; The device is further configured to add a preset rendering function to the interface layout control of the application page, so as to call the rendering function to obtain the system version of the program system applied by the application page; when the system version is a first type version, the text pop-up is rendered and displayed based on the input parameter data of the rendering function; when the system version is a second type version, a subview is set based on the input parameter data of the rendering function, and the subview is inserted at the bottom of the stacked view where the interface layout control is located, so as to render and display the text pop-up based on the stacked view; wherein, the first type version is a version after iOS 13, and the second type version is a version before iOS 13.

12. An electric vehicle, characterized in that, The electric vehicle includes a processor and a memory connected to the processor, wherein the memory stores program data, and the processor is configured to retrieve the program data stored in the memory to execute the method as described in any one of claims 1-10.

13. A computer-readable storage medium internally storing program instructions, characterized in that, When the program instructions are executed by the processor, they implement the method as described in any one of claims 1-10.