CN107943477A - A kind of method for realizing UI layouts on iOS by XML - Google Patents

A kind of method for realizing UI layouts on iOS by XML Download PDF

Info

Publication number
CN107943477A
CN107943477A CN201711176432.8A CN201711176432A CN107943477A CN 107943477 A CN107943477 A CN 107943477A CN 201711176432 A CN201711176432 A CN 201711176432A CN 107943477 A CN107943477 A CN 107943477A
Authority
CN
China
Prior art keywords
xml
xml file
layout
layouts
app
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711176432.8A
Other languages
Chinese (zh)
Inventor
邵增光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kuwo Technology Co Ltd
Original Assignee
Beijing Kuwo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kuwo Technology Co Ltd filed Critical Beijing Kuwo Technology Co Ltd
Priority to CN201711176432.8A priority Critical patent/CN107943477A/en
Publication of CN107943477A publication Critical patent/CN107943477A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The present invention relates to a kind of method for realizing UI layouts on iOS by XML, step are as follows:(1)XML layout code is obtained, sets class name;(2)App engineerings are created, one and XML file interim test class of the same name is created, adds corresponding control, be then added in main VC;(3)In App engineerings, XML file is generated, adds XML layout code;(4)Run App;(5)App calls interim test class, loads OC layout codes;(6)Interim test class loading and class name XML file of the same name;(7)Interim test class parses and judges whether XML file content is correct, if mistake, prompts mistake;If correct, XML file content is forwarded into layout code resolver.The present invention, it is dynamic to set UI layouts by XML file, fast construction UI interfaces and in real time adjustment UI interfaces are realized, improves development efficiency, unified UI layout setting means, cooperates easy to developer, rapid response to customer's need.

Description

A kind of method for realizing UI layouts on iOS by XML
Technical field
The present invention relates to UI layout development technique field, the side for realizing UI layouts on a kind of iOS by XML is specifically Method.
Background technology
UI, that is, User Interface(User interface)Abbreviation.Refer to the operation interface of user, include mobile APP, net Page, intelligent wearable device etc..UI designs the pattern for referring mainly to interface, aesthetic measure.And use it is upper, human-computer interaction to software, The global design of operation logic, beautiful interface is then another gateway of no less important.Good UI is not only to allow software to become to have Individual character is had good taste, and also to be allowed the operation of software to become comfortable, simple, free, be fully demonstrated positioning and the feature of software.
When learning UI designs, the layout of the page is often touched, the mode of layout can directly affect an APP Visual effect, good layout type, tends to bring comfortable visual effect, can more obtain receiving and the favorable comment of user.
UI components are defined by XML file, can be reached when needing to adjust UI layouts by the modification to XML file To purpose, easy to debug and update.
The content of the invention
For defect existing in the prior art, it is an object of the invention to provide realize UI cloth by XML on a kind of iOS The method of office, it is dynamic to set UI layouts by XML file, fast construction UI interfaces and in real time adjustment UI interfaces are realized, is carried High development efficiency, unified UI layout setting means, cooperates easy to developer, rapid response to customer's need.
To achieve the above objectives, the present invention adopts the technical scheme that:
A kind of method for realizing UI layouts on iOS by XML, it is characterised in that include the following steps:
Step 1, XML layout code is obtained, class name is set, to name XML file according to class name;
Step 2, App engineerings are created, one and XML file interim test class of the same name is created, adds corresponding control, Ran Houtian It is added in main VC;
Step 3, in App engineerings, XML file described in generation step 1, adds XML layout code, forms XML layout file;
Step 4, App is run;
Step 5, App calls interim test class, and interim test class loads OC layout codes;
Step 6, interim test class loading and class name XML file of the same name;
Step 7, interim test class parses and judges whether XML file content is correct,
If mistake, prompts mistake;
If correct, XML file content is forwarded into layout code resolver.
Based on the above technical solutions, XML file described in step 1 is at least one.
Based on the above technical solutions, XML file described in step 1, including:
The layout information of control, for setting control location and size,
The style information of control, for setting the pattern of control.
Based on the above technical solutions, in step 7, if mistake, need to correct mistake by step 3 again.
Based on the above technical solutions, during layout code resolver parsing XML file content,
If parsing is correct, corresponding UI layouts are generated, layout effect is presented to user;
If parsing mistake, user is prompted to update XML file.
Based on the above technical solutions, after updating XML file, realized by restarting App to updating The loading of the XML file arrived.
The method for realizing UI layouts on iOS of the present invention by XML, it is dynamic to set UI cloth by XML file Office, realizes fast construction UI interfaces and in real time adjustment UI interfaces, improves development efficiency, and unified UI is laid out setting means, Cooperate easy to developer, rapid response to customer's need.
Advantage is:
1st, for fast construction UI interfaces, can be used among agile development, and the UI GUI codes and business worked it out Logical code is completely separated.
2nd, when finding that some interface needs adjustment, XML file can be directly adjusted, finding is gained, no Need to rerun code.
Brief description of the drawings
The present invention has drawings described below:
The flow chart of Fig. 1 present invention.
Embodiment
The present invention is described in further detail below in conjunction with attached drawing.
As shown in Figure 1, realizing the method for UI layouts on iOS of the present invention by XML, include the following steps:
Step 1, XML layout code is obtained, class name is set, to name XML file according to class name;
The class name refers to the title of class;
Such as:XML file is named as TestView.xml;
Step 2, App engineerings are created, one and XML file interim test class of the same name is created, adds corresponding control, Ran Houtian It is added in main VC;
Such as:The entitled TestView of class of interim test class;
Step 3, in App engineerings, XML file described in generation step 1, adds XML layout code, forms XML layout file;
Step 4, App is run;
Step 5, App calls interim test class, and interim test class loads OC layout codes;
Step 6, interim test class loading and class name XML file of the same name;
Step 7, interim test class parses and judges whether XML file content is correct,
If mistake, prompts mistake;
If correct, XML file content is forwarded into layout code resolver.
Based on the above technical solutions, XML file described in step 1 is at least one.
Based on the above technical solutions, XML file described in step 1, including:
The layout information of control, for setting control location and size,
The style information of control, for setting the pattern of control.
Based on the above technical solutions, in step 7, if mistake, need to correct mistake by step 3 again.
Based on the above technical solutions, during layout code resolver parsing XML file content,
If parsing is correct, corresponding UI layouts are generated, layout effect is presented to user;
If parsing mistake, user is prompted to update XML file.
Based on the above technical solutions, after updating XML file, realized by restarting App to updating The loading of the XML file arrived.
The content not being described in detail in this specification belongs to the prior art known to professional and technical personnel in the field.

Claims (6)

1. the method for UI layouts is realized on a kind of iOS by XML, it is characterised in that include the following steps:
Step 1, XML layout code is obtained, class name is set, to name XML file according to class name;
Step 2, App engineerings are created, one and XML file interim test class of the same name is created, adds corresponding control, Ran Houtian It is added in main VC;
Step 3, in App engineerings, XML file described in generation step 1, adds XML layout code, forms XML layout file;
Step 4, App is run;
Step 5, App calls interim test class, and interim test class loads OC layout codes;
Step 6, interim test class loading and class name XML file of the same name;
Step 7, interim test class parses and judges whether XML file content is correct,
If mistake, prompts mistake;
If correct, XML file content is forwarded into layout code resolver.
2. the method for UI layouts is realized on iOS as claimed in claim 1 by XML, it is characterised in that:XML described in step 1 File is at least one.
3. the method for UI layouts is realized on iOS as claimed in claim 1 by XML, it is characterised in that:XML described in step 1 File, including:
The layout information of control, for setting control location and size,
The style information of control, for setting the pattern of control.
4. the method for UI layouts is realized on iOS as claimed in claim 1 by XML, it is characterised in that:In step 7, if wrong By mistake, then need to correct mistake by step 3 again.
5. the method for UI layouts is realized on iOS as claimed in claim 1 by XML, it is characterised in that:Layout code resolver When parsing XML file content,
If parsing is correct, corresponding UI layouts are generated, layout effect is presented to user;
If parsing mistake, user is prompted to update XML file.
6. the method for UI layouts is realized on iOS as claimed in claim 5 by XML, it is characterised in that:Update XML texts After part, by restarting loading of the App realizations to the XML file updated.
CN201711176432.8A 2017-11-22 2017-11-22 A kind of method for realizing UI layouts on iOS by XML Pending CN107943477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711176432.8A CN107943477A (en) 2017-11-22 2017-11-22 A kind of method for realizing UI layouts on iOS by XML

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711176432.8A CN107943477A (en) 2017-11-22 2017-11-22 A kind of method for realizing UI layouts on iOS by XML

Publications (1)

Publication Number Publication Date
CN107943477A true CN107943477A (en) 2018-04-20

Family

ID=61929892

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711176432.8A Pending CN107943477A (en) 2017-11-22 2017-11-22 A kind of method for realizing UI layouts on iOS by XML

Country Status (1)

Country Link
CN (1) CN107943477A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109799988A (en) * 2018-12-13 2019-05-24 深圳壹账通智能科技有限公司 IOS page layout method, terminal device and computer readable storage medium
CN111751707A (en) * 2020-06-28 2020-10-09 芯佰微电子(北京)有限公司 Test circuit and chip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506814A (en) * 2002-12-10 2004-06-23 联想(北京)有限公司 Method of describing application program interface with expandable markup language
WO2008124420A1 (en) * 2007-04-04 2008-10-16 Honeywell International Inc. A mechanism to improve a user's interaction with a computer system
CN103226471A (en) * 2013-03-21 2013-07-31 南京工业大学 Design method of firmware GUI based on SVG
CN104484171A (en) * 2014-12-11 2015-04-01 深圳市路通网络技术有限公司 System, method and associated equipment for designing terminal interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506814A (en) * 2002-12-10 2004-06-23 联想(北京)有限公司 Method of describing application program interface with expandable markup language
WO2008124420A1 (en) * 2007-04-04 2008-10-16 Honeywell International Inc. A mechanism to improve a user's interaction with a computer system
CN103226471A (en) * 2013-03-21 2013-07-31 南京工业大学 Design method of firmware GUI based on SVG
CN104484171A (en) * 2014-12-11 2015-04-01 深圳市路通网络技术有限公司 System, method and associated equipment for designing terminal interface

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109799988A (en) * 2018-12-13 2019-05-24 深圳壹账通智能科技有限公司 IOS page layout method, terminal device and computer readable storage medium
CN109799988B (en) * 2018-12-13 2022-03-15 深圳壹账通智能科技有限公司 iOS page layout method, terminal device and computer readable storage medium
CN111751707A (en) * 2020-06-28 2020-10-09 芯佰微电子(北京)有限公司 Test circuit and chip

Similar Documents

Publication Publication Date Title
CA2951145C (en) Page constructor and page constructing method
CN104424338B (en) The automatically generating device and automatic generation method of web system
CN104484169B (en) A kind of Android software user interface creating method, system and application system
RU2536390C2 (en) Automated report generation method
CN102609252B (en) Based on the logic menu resource intelligent configuration method measuring instrument
CN103631597B (en) WEB list engine apparatus based on XML and method
CN107729003A (en) Automatic generation method, device and the electronic equipment of code
CN105487864A (en) Method and device for automatically generating code
US8887076B2 (en) Software user interface allowing logical expression to be expressed as a flowchart
CN115712413B (en) Low code development method, device, equipment and storage medium
CN106354492A (en) Automatic code generation method and system capable of rapidly adjusting transaction process connection
CN109710631A (en) Auxiliary generates method, apparatus, equipment and the computer storage medium of SQL code
CN105389084A (en) Convenient information inputting method for user of mobile terminal and mobile terminal
CN108762743A (en) Data table operation code generation method and device
CN104536768A (en) Method for improving user-friendly operation of software user interface
CN113886362A (en) Data storage system and storage method based on workflow engine and low-code platform
CN106484898A (en) A kind of method and device of the dynamic generation Web system page
CN105630514A (en) Form designing method based on modularization
CN111625226A (en) Prototype-based human-computer interaction design implementation method and system
CN109284152A (en) A kind of menu visual configuration method, equipment and computer readable storage medium
CN104391703A (en) Quick page layout completing device and method
CN105117379A (en) Automatic program text converting method and device
CN107943477A (en) A kind of method for realizing UI layouts on iOS by XML
CN107977203A (en) The creation method of storage device, application program control and user interface
CN106951254A (en) The method and device that similar traffic functional module is multiplexed in payment system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180420