Display mode interface adaptation method based on iOS client, medium and equipment

By obtaining device information and querying preset tables to determine the display mode, loading the corresponding interface layout and adjusting it, the problem that iOS applications display in larger font mode does not meet expectations, and realizes accurate display control and user experience for different devices promote.

CN119201325APending Publication Date: 2024-12-27GUIYANG YUWAN SCI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411376950.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing iOS apps do not show up in larger font modes, resulting in poor user experience. The existing technology mainly relies on screen size for enlarged display and ignores the display mode, resulting in difficulty in precise control.

Method used

By obtaining device information, querying the preset table to determine the display mode of the current device, and loading the corresponding interface layout according to the mode, including adjusting Auto Layout constraints, text elements, picture elements and view elements to adapt to Zoomed mode.

Benefits of technology

Accurate control of different display modes is achieved, user experience is improved, and interface adaptability is ensured in various device models and display modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201325A_ABST
    Figure CN119201325A_ABST
Patent Text Reader

Abstract

The invention provides a display mode interface adaptation method based on an iOS client side, a medium and equipment, the method is applied to the iOS client side, and the method comprises the steps that equipment information of current equipment is acquired; a preset table is inquired according to the equipment information, the display mode of the current equipment is determined, and the preset table comprises the corresponding relation between the equipment information of the multiple kinds of equipment using the iOS client side and the display mode; and loading an interface layout corresponding to the display mode based on the display mode of the current equipment. According to the mode, whether the display mode of the current equipment is the Standard mode or the Zoomed mode can be determined by looking up the table, so that loading of the interface layout corresponding to the display mode becomes possible, a developer only needs to design one set of interface layout when designing the interface layout, different display modes of equipment of various equipment models can be adapted, and the development efficiency is improved. Accurate display control is achieved, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of iOS development technology, and more specifically, to a display mode interface adaptation method, medium and device based on an iOS client. Background Art

[0002] Electronic devices using iOS systems (such as iPhones, iPad tablets, iPod touch players, etc.) allow users to adjust the device's zoom display mode (default / larger font) according to personal preferences. However, conventional apps are only designed for the default mode. When users set the font to a larger size, the display of the app may not meet expectations. Currently, the existing display mode interface adaptation is mainly based on the current device's screen size (i.e., directly zooming in on the display).

[0003] In the prior art, the display is performed according to the screen size of the current device, but the current display mode (default / larger font) is unknown. Each device has a variety of models and different screen parameters, so deviations are easy to occur when precise display control is required, resulting in a poor user experience. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a display mode interface adaptation method, medium and device based on an iOS client, so as to realize interface display control of various electronic devices using the iOS system in different modes, realize precise control of display, and improve user experience.

[0005] In order to achieve the above purpose, the embodiments of the present application are implemented in the following manner:

[0006] In the first aspect, an embodiment of the present application provides a display mode interface adaptation method based on an iOS client, which is applied to an iOS client, and the method includes: obtaining device information of the current device; querying a preset table based on the device information to determine the display mode of the current device, wherein the preset table contains the correspondence between device information and display modes of multiple devices using the iOS client; based on the display mode of the current device, loading the interface layout of the corresponding display mode.

[0007] In combination with the first aspect, in a first possible implementation method of the first aspect, the preset table contains the correspondence between the device model, display mode and logical width and height, and obtains the device information of the current device, including: identifying the device model of the current device through the hardware model identifier; and obtaining the logical width and height of the current device through the API.

[0008] In combination with the first possible implementation method of the first aspect, in a second possible implementation method of the first aspect, the display mode includes a Standard mode and a Zoomed mode, and the display mode of the current device is determined by querying a preset table according to the device information, including: querying the preset table through the device model and logical width and height of the current device to determine whether the display mode of the current device is a Standard mode or a Zoomed mode.

[0009] In combination with the second possible implementation method of the first aspect, in a third possible implementation method of the first aspect, based on the display mode of the current device, the interface layout of the corresponding display mode is loaded, including: if the display mode of the current device is Standard mode, determining the interface layout corresponding to the current device and loading it; if the display mode of the current device is Zoomed mode, determining the interface layout corresponding to the current device, adjusting the interface layout, and loading the adjusted interface layout.

[0010] In combination with the third possible implementation method of the first aspect, in a fourth possible implementation method of the first aspect, the interface layout is adjusted and the adjusted interface layout is loaded, including: adjusting the interface layout using at least one of the following adjustment methods to adapt the interface layout to the Zoomed mode: for interface elements: adjusting Auto Layout constraints, including at least one of interface element ratio, interface element spacing, and constraint priority; for text elements: adjusting the font size of text elements to the set font ratio; for image elements: loading a high-resolution version of the same image element, wherein the same image element has a regular resolution version and a high-resolution version; for view elements: enabling scrolling view or paging view.

[0011] In combination with the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, adjusting the Auto Layout constraints includes: traversing the constraints of all interface elements, determining the interface elements to be adjusted with marks, wherein the interface elements that cannot be directly adapted in Zoomed mode are marked in advance, and the marks include a first mark, a second mark, and a third mark; for the interface elements to be adjusted with the first mark: adjusting the interface elements to be adjusted to a set ratio; for the interface elements to be adjusted with the second mark: adjusting the spacing between the interface elements to be adjusted and other interface elements to a set value; for the interface elements to be adjusted with the third mark: enabling the set constraint priority of the interface elements to be adjusted.

[0012] In combination with the fourth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, enabling a scrolling view or a paging view includes: traversing all view elements to determine the view elements to be adjusted with marks, wherein the view elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include a fourth mark and a fifth mark; for the view elements to be adjusted with the fourth mark: enabling the scrolling function of the view elements to be adjusted; for the view elements to be adjusted with the fifth mark: enabling the scrolling function and the paging function of the view elements to be adjusted.

[0013] In the second aspect, an embodiment of the present application provides a display mode interface adaptation device based on an iOS client, which is applied to an iOS client and includes: a device information acquisition module, used to obtain device information of the current device; a display mode determination module, used to query a preset table according to the device information to determine the display mode of the current device, wherein the preset table contains the correspondence between device information and display modes of multiple devices using the iOS client; an interface layout loading module, used to load the interface layout of the corresponding display mode based on the display mode of the current device.

[0014] In a third aspect, an embodiment of the present application provides a storage medium, which is arranged in a device and includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the display mode interface adaptation method based on the iOS client as described in the first aspect or any one of the possible implementation methods of the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory being used to store information including program instructions, the processor being used to control the execution of the program instructions, and the program instructions, when loaded and executed by the processor, implementing the steps of the display mode interface adaptation method based on the iOS client as described in the first aspect or any one of the possible implementation methods of the first aspect.

[0016] Beneficial effects:

[0017] 1. This solution obtains the device information of the current device (such as device model and logical width and height), queries the preset table (including the correspondence between the device information and display mode of various devices using the iOS client, which is essentially the correspondence between the device model, display mode and logical width and height), determines the display mode of the current device, and loads the interface layout of the corresponding display mode based on the display mode of the current device. Since it is usually impossible to directly obtain the display mode of the user device (the current device using the iOS client), and when the display mode of iOS (Standard mode and Zoomed mode) is different, the logical width and height that can be displayed on the screen are different (that is, the number of points that can be displayed on the screen in the two modes is different), and the logical width and height parameter can be obtained through the API. Combined with the device model, by looking up the table (collecting the logical width and height of various device models using the iOS client in Standard mode or Zoomed mode), it can be determined whether the current display mode is Standard mode or Zoomed mode, thereby making it possible to load the interface layout of the corresponding display mode. So that when developers design the interface layout, they only need to design one set of interface layout to adapt to the different display modes of devices of various device models, achieve precise display control, and improve user experience.

[0018] 2. When the display mode of the current device is Standard mode, determine the corresponding interface layout (here, the corresponding interface layout is determined by using the technology of adapting the interface based on the screen size of the current device) and load it; when the display mode of the current device is Zoomed mode, first determine the interface layout corresponding to the current device (i.e., adapt the interface layout based on the screen size of the current device), further adjust the interface layout, and then load the adjusted interface layout. The interface layout adjustment for Zoomed mode includes adjusting one or more of the interface elements (adjusting Auto Layout constraints, including at least one of the interface element ratio, interface element spacing, and constraint priority), text elements (adjusting the font size of text elements to the set font ratio), image elements (loading a high-resolution version of the same image element), and view elements (enabling scroll view or paging view). When adjusting the interface elements, by traversing the constraints of all interface elements, determine the interface elements to be adjusted with marks (interface elements that cannot be directly adapted in Zoomed mode are marked in advance, and the marks include the first mark, the second mark, and the third mark), and make corresponding adjustments to the interface elements to be adjusted with different marks (the first mark, the second mark, and the third mark). When adjusting view elements, all view elements are traversed to determine the marked view elements to be adjusted (view elements that cannot be directly adapted in Zoomed mode are marked in advance, and the marks include the fourth mark and the fifth mark), and then corresponding adjustments are made for different marks (the fourth mark and the fifth mark). In this way, fine-tuning of various elements (interface elements, text elements, image elements, view elements, etc.) can be proposed for the adaptation and adjustment of different devices in Standard mode and Zoomed mode, and precise adjustments are made considering the specific conditions of various indicators in various elements to achieve precise display control and improve user experience.

[0019] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A flowchart of a display mode interface adaptation method based on an iOS client provided in an embodiment of the present application.

[0022] Figure 2 A schematic diagram showing the device information and display modes of the example devices in the preset table.

[0023] Figure 3 The structural block diagram of the display mode interface adaptation device based on the iOS client.

[0024] Icons: 10 - display mode interface adaptation device based on iOS client; 11 - device information acquisition module; 12 - display mode determination module; 13 - interface layout loading module. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0026] The display mode interface adaptation method based on iOS client provided in this embodiment is applied to iOS client. In essence, it is run through an electronic device installed with iOS client (electronic devices using iOS system, such as iPhone mobile phone, iPad tablet computer, iPod touch player, etc.). This embodiment introduces this solution with the iOS client installed in the electronic device as the execution entity.

[0027] See also Figure 1 , Figure 1 A flowchart of a display mode interface adaptation method based on an iOS client provided in an embodiment of the present application. In this embodiment, the display mode interface adaptation method based on an iOS client may include step S10, step S20 and step S30.

[0028] When the electronic device starts the iOS client, the iOS client may execute step S10.

[0029] Step S10: Obtain device information of the current device.

[0030] In this embodiment, the electronic device can obtain device information of the current device, specifically, can identify the device model of the current device through a hardware model identifier, and obtain the logical width and height of the current device through an API.

[0031] For example, iPhone10,3 is the hardware model identifier of iPhone X, iPad5,3 is the hardware model identifier of iPad Air2 (WiFi), the hardware model identifier can be used to identify the device model of the current device (the device model can be queried through serials), and the logical width and height of the current device can be obtained through the API.

[0032] After acquiring the device information of the current device, the iOS client may execute step S20.

[0033] Step S20: querying a preset table according to the device information to determine the display mode of the current device, wherein the preset table contains the correspondence between the device information and the display mode of various devices using the iOS client.

[0034] In this embodiment, the preset table contains the correspondence between the device model, display mode, and logical width and height. Of course, the preset table can also contain more information, such as the device name obtained through the API. The display mode includes Standard mode and Zoomed mode, which represent the default font and larger font respectively. The logical width and height represent the number of dots required to display on the display screen of the current device. For example Figure 2 As shown, the displayed information is: the device model is iPhoneX_series, the device name is iPhoneX, the logical width and height in Standard mode are 375*812, and the logical width and height in Zoomed mode are 320*693.

[0035] The preset table collects this information of various devices using the iOS client, forming a correspondence between the device information and the display mode of each device. It is built into the iOS client as a preset table and loaded via lazy loading (that is, it is loaded only when needed to avoid unnecessary loading that affects App performance).

[0036] Then, after obtaining the device information of the current device, the iOS client can query the preset table, and according to the device information of the current device (mainly the device model and logical width and height, and in other embodiments, more information such as the device name can also be obtained as an auxiliary, which will not be repeated in this embodiment), search for the corresponding relationship in the preset table to determine whether the display mode of the current device is Standard mode or Zoomed mode.

[0037] After determining the display mode of the current device, the iOS client may further execute step S30.

[0038] Step S30: Based on the display mode of the current device, load the interface layout corresponding to the display mode.

[0039] In this embodiment, the iOS client can load the interface layout of the corresponding display mode based on the display mode of the current device.

[0040] If the display mode of the current device is Standard mode, then the iOS client can determine the interface layout corresponding to the current device and load it. Here, the iOS client determines the interface layout corresponding to the current device, which is essentially a solution for adapting the interface layout based on the screen size of the current device. This method is very common and will not be described in detail here.

[0041] If the display mode of the current device is Zoomed mode, the iOS client can determine the interface layout corresponding to the current device (also the interface layout adapted based on the screen size of the current device), adjust the interface layout, and load the adjusted interface layout.

[0042] Exemplarily, the adjustment of the interface layout may include multiple aspects, such as interface elements, text elements, picture elements, view elements, etc. It should be noted that the traditional interface element is a relatively high-level concept, including multiple elements such as view, space, container, picture, etc. This embodiment uses the parts of the traditional interface elements other than text elements, picture elements, and view elements as the interface elements defined in this embodiment, because this embodiment needs to make independent adjustments to the text elements, picture elements, and view elements.

[0043] Accordingly, the iOS client may adjust the interface layout in at least one of the following ways (ie, some adjustments may be missing, such as high-resolution versions of images may not be available) to adapt the interface layout to the Zoomed mode.

[0044] For UI elements: iOS clients can adjust Auto Layout constraints, including at least one of UI element proportions, UI element spacing, and constraint priority.

[0045] Specifically, the iOS client can traverse the constraints of all interface elements and determine the marked interface elements to be adjusted, wherein the interface elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include a first mark, a second mark and a third mark.

[0046] For the interface element to be adjusted with the first mark: adjust the interface element to be adjusted to the set ratio. The set ratio here needs to be calculated and limited, mainly by using the logical width and height in Standard mode of the current device and the logical width and height in Zoomed mode to calculate the ratio, and the maximum value limit needs to be considered (the maximum value limits of different interface elements to be adjusted may be different, and need not exceed the screen display range), which can all be dynamically calculated to determine the set ratio (if the ratio of the logical width and height in Standard mode to the logical width and height in Zoomed mode exceeds the limit, the limit value is used as the set ratio; if it does not exceed the limit, the calculated ratio is used as the set ratio).

[0047] For interface elements to be adjusted that have a second mark: adjust the spacing between this interface element to be adjusted and other interface elements to the set value. For such interface elements to be adjusted, it is necessary to further consider the spacing between this interface element to be adjusted and other interface elements to avoid mutual overlap between interface elements, so as to agree on a set spacing. For interface elements to be adjusted that have a second mark but do not require precise control, uniform distribution can be achieved by setting the spacing between this interface element to be adjusted and other interface elements to the mean spacing; and for interface elements to be adjusted that have a second mark but require precise control, it is necessary to design a dynamic calculation scheme for the set value based on specific control requirements (such as the layout of controls needs to meet some specific requirements) to achieve precise control, which will not be elaborated here.

[0048] For the interface elements to be adjusted with the third mark: Enable the setting constraint priority of this interface element to be adjusted. For such interface elements to be adjusted, it is necessary to further set the priority to ensure that when important interface elements conflict with other interface elements, the constraints corresponding to such interface elements are given priority.

[0049] For text elements: iOS clients can adjust the font size of text elements to the set font ratio. Since iOS client programs that support Dynamic Type can automatically update the size of text elements to match user preferences, when considering Zoomed mode, further enlargement is required. Therefore, the set font ratio can be calculated by the logical width and height in Standard mode of the current device and the logical width and height in Zoomed mode for further adjustment.

[0050] For image elements: iOS clients can load high-resolution versions of the same image element, where the same image element has a regular resolution version and a high-resolution version. Of course, the regular resolution version must be available, but the high-resolution version may not always be available, but it can be available. When the high-resolution version of the image element is available, the high-resolution version of the image element is loaded.

[0051] For view elements: iOS clients can enable scroll view or paging view.

[0052] Specifically, the iOS client can traverse all view elements and determine the view elements to be adjusted with marks, wherein the view elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include the fourth mark and the fifth mark.

[0053] For the view element to be adjusted with the fourth mark: enable the scrolling function of the view element to be adjusted. This type of view element to be adjusted needs to implement the scrolling function. For example, it can be implemented through UIScrollView. The contentSize property of UIScrollView defines the content area size of the view element. If the adapted content area is larger than the frame of the view element, the scrolling function is enabled for this view element.

[0054] For the view element to be adjusted with the fifth mark: enable the scrolling function and paging function of this view element to be adjusted. For the view element to be adjusted with paging requirements, you can enable the paging function by setting the pagingEnabled property of UIScrollView to YES on the basis of enabling the scrolling function.

[0055] After the adjustment of the interface layout is completed, the iOS client can load the adjusted interface layout, thereby completing the interface adaptation of the iOS client in different display modes.

[0056] See also Figure 3 Based on the same inventive concept, the embodiment of the present application further provides a display mode interface adaptation device 10 based on an iOS client, which is applied to an iOS client and includes:

[0057] The device information acquisition module 11 is used to acquire the device information of the current device.

[0058] The display mode determination module 12 is used to query a preset table according to the device information to determine the display mode of the current device, wherein the preset table contains the correspondence between the device information and the display mode of various devices using the iOS client.

[0059] The interface layout loading module 13 is used to load the interface layout corresponding to the display mode based on the display mode of the current device.

[0060] In this embodiment, the preset table contains the correspondence between the device model, display mode and logical width and height. The device information acquisition module 11 is specifically used to: identify the device model of the current device through the hardware model identifier; and obtain the logical width and height of the current device through the API.

[0061] In this embodiment, the display mode includes the Standard mode and the Zoomed mode. The display mode determination module 12 is specifically used to query a preset table according to the device model and logical width and height of the current device to determine whether the display mode of the current device is the Standard mode or the Zoomed mode.

[0062] In this embodiment, the interface layout loading module 13 is specifically used to: if the display mode of the current device is Standard mode, determine the interface layout corresponding to the current device and load it; if the display mode of the current device is Zoomed mode, determine the interface layout corresponding to the current device, adjust the interface layout, and load the adjusted interface layout.

[0063] In this embodiment, the interface layout loading module 13 is specifically used to: adjust the interface layout by using at least one of the following adjustment methods to adapt the interface layout to the Zoomed mode: for interface elements: adjust the Auto Layout constraints, including at least one of the interface element ratio, interface element spacing and constraint priority; for text elements: adjust the font size of the text elements to the set font ratio; for image elements: load a high-resolution version of the same image element, wherein the same image element has a regular resolution version and a high-resolution version; for view elements: enable scrolling view or paging view.

[0064] In this embodiment, the interface layout loading module 13 is specifically used to: traverse the constraints of all interface elements, determine the interface elements to be adjusted with marks, wherein the interface elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include a first mark, a second mark and a third mark; for the interface elements to be adjusted with the first mark: adjust the interface elements to be adjusted to the set ratio; for the interface elements to be adjusted with the second mark: adjust the distance between the interface elements to be adjusted and other interface elements to the set value; for the interface elements to be adjusted with the third mark: enable the set constraint priority of the interface elements to be adjusted.

[0065] In this embodiment, the interface layout loading module 13 is specifically used to: traverse all view elements, determine the view elements to be adjusted with marks, wherein the view elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include a fourth mark and a fifth mark; for the view elements to be adjusted with the fourth mark: enable the scrolling function of the view elements to be adjusted; for the view elements to be adjusted with the fifth mark: enable the scrolling function and paging function of the view elements to be adjusted.

[0066] The present embodiment provides a storage medium, which is set in a device and includes a stored program. When the program is running, the device where the storage medium is located is controlled to execute the display mode interface adaptation method based on the iOS client of the present embodiment.

[0067] In addition, this embodiment also provides an electronic device, including a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, and when the program instructions are loaded and executed by the processor, the steps of the display mode interface adaptation method based on the iOS client of this embodiment are implemented.

[0068] In summary, the embodiment of the present application provides a display mode interface adaptation method, medium and device based on an iOS client, by obtaining the device information of the current device (such as the device model and logical width and height), querying a preset table (including the correspondence between the device information and the display mode of various devices using the iOS client, which is essentially the correspondence between the device model, the display mode and the logical width and height), determining the display mode of the current device, and then loading the interface layout of the corresponding display mode based on the display mode of the current device. Since it is usually impossible to directly obtain the display mode of the user device (the current device using the iOS client), and when the display mode of iOS (Standard mode and Zoomed mode) is different, the logical width and height that can be displayed on the screen are different (that is, the number of Points that can be displayed on the screen in the two modes is different), and the logical width and height parameter can be obtained through the API, combined with the device model, by looking up the table (collecting the logical width and height of devices of various device models using the iOS client in Standard mode or Zoomed mode), it can be determined whether the current display mode is Standard mode or Zoomed mode, thereby making it possible to load the interface layout of the corresponding display mode. So that when developers design the interface layout, they only need to design one set of interface layout to adapt to the different display modes of devices of various device models, achieve precise display control, and improve user experience.

[0069] When the display mode of the current device is Standard mode, the corresponding interface layout is determined (here, the corresponding interface layout is determined by using the technology of adapting the interface based on the screen size of the current device) and loaded; when the display mode of the current device is Zoomed mode, the interface layout corresponding to the current device is first determined (i.e., the interface layout is adapted based on the screen size of the current device), the interface layout is further adjusted, and then the adjusted interface layout is loaded. The interface layout adjustment for Zoomed mode includes adjusting one or more of the interface elements (adjusting Auto Layout constraints, including at least one of the interface element ratio, interface element spacing, and constraint priority), text elements (using Dynamic Type to adjust the font size of text elements), image elements (loading a high-resolution version of the same image element), and view elements (enabling scroll view or paging view). When adjusting the interface elements, by traversing the constraints of all interface elements, the interface elements to be adjusted with marks are determined (the interface elements that cannot be directly adapted in Zoomed mode are marked in advance, and the marks include the first mark, the second mark, and the third mark), and the interface elements to be adjusted with different marks (the first mark, the second mark, and the third mark) are adjusted accordingly. When adjusting view elements, all view elements are traversed to determine the marked view elements to be adjusted (view elements that cannot be directly adapted in Zoomed mode are marked in advance, and the marks include the fourth mark and the fifth mark), and then corresponding adjustments are made for different marks (the fourth mark and the fifth mark). In this way, fine-tuning of various elements (interface elements, text elements, image elements, view elements, etc.) can be proposed for the adaptation and adjustment of different devices in Standard mode and Zoomed mode, and precise adjustments are made considering the specific conditions of various indicators in various elements to achieve precise display control and improve user experience.

[0070] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0071] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A display mode interface adaptation method based on an iOS client, characterized in that: Applied to iOS clients, the methods include: Get the device information of the current device; Query a preset table according to the device information to determine the display mode of the current device, wherein the preset table contains the corresponding relationship between the device information and the display mode of various devices using the iOS client; Based on the display mode of the current device, load the interface layout of the corresponding display mode.

2. The display mode interface adaptation method based on iOS client according to claim 1, characterized in that: The preset table contains the correspondence between device model, display mode and logical width and height, and obtains the device information of the current device, including: Identify the device model of the current device through the hardware model identifier; Get the logical width and height of the current device through the API.

3. The display mode interface adaptation method based on iOS client according to claim 2, characterized in that: The display mode includes Standard mode and Zoomed mode. The display mode of the current device is determined by querying the preset table based on the device information, including: According to the device model and logical width and height of the current device, the preset table is queried to determine whether the display mode of the current device is Standard mode or Zoomed mode.

4. The display mode interface adaptation method based on iOS client according to claim 3 is characterized in that: Based on the display mode of the current device, load the interface layout of the corresponding display mode, including: If the display mode of the current device is Standard mode, determine the interface layout corresponding to the current device and load it; If the display mode of the current device is Zoomed mode, determine the interface layout corresponding to the current device, adjust the interface layout, and load the adjusted interface layout.

5. The display mode interface adaptation method based on iOS client according to claim 4, characterized in that: Adjust the interface layout and load the adjusted interface layout, including: Use at least one of the following methods to adjust the interface layout to adapt it to the Zoomed mode: For UI elements: adjust Auto Layout constraints, including at least one of UI element scale, UI element spacing, and constraint priority. For text elements: adjust the font size of the text element to the set font ratio; For image elements: load a high-resolution version of the same image element, where the same image element has a regular-resolution version and a high-resolution version; For view elements: Enable scroll view or paging view.

6. The display mode interface adaptation method based on iOS client according to claim 5, characterized in that: Adjust Auto Layout constraints, including: Traversing the constraints of all interface elements, determining the interface elements to be adjusted with marks, wherein the interface elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include a first mark, a second mark, and a third mark; For the interface element to be adjusted that has the first mark: adjusting the interface element to be adjusted to a set ratio; For the interface element to be adjusted with the second mark: adjusting the distance between the interface element to be adjusted and other interface elements to a set value; For the UI element to be adjusted with the third marker: enable setting constraint priority of the UI element to be adjusted.

7. The display mode interface adaptation method based on iOS client according to claim 5, characterized in that: Enable scroll view or paging view, including: Traversing all view elements, determining view elements to be adjusted that have marks, wherein view elements that cannot be directly adapted in the Zoomed mode are marked in advance, and the marks include a fourth mark and a fifth mark; For the view element to be adjusted with the fourth mark: enabling the scrolling function of the view element to be adjusted; For the view element to be adjusted that has the fifth marker: enable the scrolling function and the paging function of the view element to be adjusted.

8. A display mode interface adaptation device based on an iOS client, characterized in that: Applied to iOS clients, including: The device information acquisition module is used to obtain the device information of the current device; A display mode determination module, used to query a preset table according to device information to determine the display mode of the current device, wherein the preset table contains the corresponding relationship between device information and display modes of multiple devices using the iOS client; The interface layout loading module is used to load the interface layout of the corresponding display mode based on the display mode of the current device.

9. A storage medium, characterized in that: The storage medium is set in the device, including a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the display mode interface adaptation method based on the iOS client according to any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions, characterized in that: When the program instructions are loaded and executed by the processor, the steps of the display mode interface adaptation method based on the iOS client as described in any one of claims 1 to 7 are implemented.