CN106528115A - Visualized interface development method and device - Google Patents

Visualized interface development method and device Download PDF

Info

Publication number
CN106528115A
CN106528115A CN201610942178.7A CN201610942178A CN106528115A CN 106528115 A CN106528115 A CN 106528115A CN 201610942178 A CN201610942178 A CN 201610942178A CN 106528115 A CN106528115 A CN 106528115A
Authority
CN
China
Prior art keywords
view
binding occurrence
value
interface
unit
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
CN201610942178.7A
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.)
LeTV Holding Beijing Co Ltd
LeTV Sports Culture Develop Beijing Co Ltd
Original Assignee
LeTV Holding Beijing Co Ltd
LeTV Sports Culture Develop Beijing 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 LeTV Holding Beijing Co Ltd, LeTV Sports Culture Develop Beijing Co Ltd filed Critical LeTV Holding Beijing Co Ltd
Priority to CN201610942178.7A priority Critical patent/CN106528115A/en
Publication of CN106528115A publication Critical patent/CN106528115A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

Embodiments of the invention provide a visualized interface development method and device. The method comprises the following steps of: firstly obtaining a first numerical value input by a user; obtaining a specific value of a unit constraint value corresponding to the current constraint value self-defined class to a first numerical value so as to obtain a practical constraint value; and finally utilizing the practical constraint value to set the size or position of a view in an interface. The first numerical value can be greater than the unit constraint value, so that the obtained practical constraint value can be a floating-point number between 0 and 1, and the size or position of the view can be constrained by the floating-point number between 0 and 1 during visualized interface development, thereby bringing great convenience to the view setting of developers. Moreover, the method provided by the embodiments of the invention is simple, easy to realize and low in technical risk, can be efficiently reused and can be widely applied to individualized interface development.

Description

The visual development method and device at interface
Technical field
The present embodiments relate to field of computer technology, more particularly to a kind of visual development method and dress at interface Put.
Background technology
With i Phone prevalence in the world, the exploitation of the iOS system application program of i Phone is also more next Carry out more con fuoco.Developer generally uses Xcode to develop the application program of iOS system.Xcode is that Apple opens The programming software sent out, which has unified user-interface design, and coding, test, debugging are all completed in a simple window, It is most quick way that developer sets up OSX and iOS application programs.Xcode exploitation iOS application views interface is general There is two ways:First kind of way is source code mode, namely developer realizes application program by compiling source code and needs View interface to be shown;Another way is visual development, although the basic of visual development is also by calling source generation Code realizing demand, but this mode relative to traditional source code have image, it is quick efficiently the characteristics of, developer can be with The demand of design interface on visual interface.AutoLayout (autoplacement) instrument in visual development method is even more Development efficiency is greatly improved, this is also a kind of development scheme at interface that Apple is recommended.
AutoLayout be it is a kind of based on constraint, descriptive view layout system, it and in the past defined the position of view Put that different with size (view here needs the view that includes in a certain control that shows in can be understood as interface, here Control can be understood as a container), in the past in definition interfaces during the position of each view, each view can be set in screen On coordinate.And the position of AutoLayout determine be with the constraint of so-called relative position defining, it is under development can give The low order end of the binding occurrence of view specified size and relative position, such as high order end of view A and view B at a distance of 5 binding occurrences, Or view A apart from 4 binding occurrences of bottom of screen.Here binding occurrence is have specific corresponding with the pixel of display screen Relation, binding occurrence 2 pixels of correspondence for the types such as iphone6, iphone6s, for iphone6s plus Deng binding occurrence 3 pixels of correspondence for type.Using this constraints (namely mapping relations of binding occurrence and pixel) The positions and dimensions largest benefit for carrying out definition interfaces view solves interface under different resolution and screen size at one stroke Adaptation issues, definition when also simplify rotation in addition to the position of view, that is to say, that originally 10 pixels are occupied on the bottom In a certain view, no matter when Rotation screen or more exchange device, also on the bottom, 10 pixels are occupied the view all the time In position, will not change.
However, inventor has found during the present invention is realized, in prior art when visual development is carried out, commonly The unit binding occurrence that specifies of binding occurrence classification be generally integer, for example, 1, in this case binding occurrence may be only configured to list The integral multiple of position binding occurrence 1, for example, 40 or 60 etc., it is impossible to get the floating number between 0 to 1.This causes developer can It is extremely inconvenient when sending out the middle position that view is set and size depending on melting.
The content of the invention
The embodiment of the present invention provides a kind of visual development method and device at interface, for overcoming in prior art During row visual development, binding occurrence cannot get the floating number between 0 to 1, be developer arrange view make troubles lack Fall into.
For achieving the above object, in a first aspect, embodiments providing a kind of visual development method at interface, bag Include:
Obtain the first numerical value of user input;
The ratio of unit binding occurrence and the first numerical value is obtained, as physical constraint value;Wherein, the unit binding occurrence, be Unit binding occurrence corresponding to the self-defined classification of current binding occurrence;
Using the physical constraint value, the size of view and/or the position of view in interface are set.
Alternatively, the ratio for obtaining unit binding occurrence and the first numerical value, including:
Unit binding occurrence and the first numerical value are obtained by performing the corresponding execution file of the self-defined classification of present confinement value Ratio.
Alternatively, the h files and m files are obtained by the constraint function of SubClassing binding occurrence, the constraint The constraint function of value includes the other constraints of the binding occurrence self defined class.
Alternatively, it is described that using the physical constraint value, the size of view and/or the position of view in interface, bag are set Include:
Call automatic layout tool that the size of view and/or the position of view in interface are set using the physical constraint value Put.
Alternatively, the position that view in interface is set using the physical constraint value, including:
The view is set relative to father's view or the relative position relative to fraternal view using the physical constraint value, And/or the view is relative to father's view or the alignment thereof relative to fraternal view;
Second aspect, the embodiment of the present invention additionally provide a kind of visual development device at interface, including:
Numerical value acquiring unit, for obtaining the first numerical value of user input;
Arithmetic element, for obtaining the ratio of unit binding occurrence and the first numerical value, as physical constraint value;Wherein, it is described Unit binding occurrence, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;
View setting unit, for arranging the size of view and/or the position of view in interface using the physical constraint value Put.
Alternatively, the arithmetic element is further used for:
By the corresponding execution file of self-defined classification for performing present confinement value, unit binding occurrence and the first number are obtained The ratio of value.
Alternatively, the execution file is obtained by the constraint function of SubClassing binding occurrence, the pact of the binding occurrence Beam function includes the other constraints of the binding occurrence self defined class.
Alternatively, the view setting unit is further used for:
Call automatic layout tool that the size of view and/or the position of view in interface are set using the physical constraint value Put.
Alternatively, the view setting unit is further used for:
The view is set relative to father's view or the relative position relative to fraternal view using the physical constraint value, And/or the view is relative to father's view or the alignment thereof relative to fraternal view.
In the visual development method and apparatus at interface provided in an embodiment of the present invention, the first of user input is obtained first Numerical value, the ratio for then obtaining the corresponding unit binding occurrence of the self-defined classification of present confinement value and the first numerical value are worth to physical constraint Value, finally recycles physical constraint value to be configured the size of view in interface or position.As the first numerical value can be more than Unit binding occurrence, therefore the physical constraint value for obtaining can be the floating number between 0-1, so as to realize at visual development interface When, the size of view or position can be constrained by the floating number between 0-1, are that developer arranges view and brings greatly It is convenient.Additionally, method provided in an embodiment of the present invention is simply easily realized, technical risk is low and can be with efficient multiplexing, can be extensive Be applied to visualization interface exploitation in.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are these Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root Other accompanying drawings are obtained according to these accompanying drawings.
A kind of visual development embodiment of the method flow chart at interface that Fig. 1 is provided for the present invention;
The visual development embodiment of the method flow chart at another kind of interface that Fig. 2 is provided for the present invention;
The self-defined classification configuration schematic diagram of binding occurrence that Fig. 3 is provided for the present invention;
A kind of visual development device embodiment structural representation at interface that Fig. 4 is provided for the present invention;
The a kind of electronic equipment example structure block diagram that Fig. 5 is provided for the present invention.
Specific embodiment
To make purpose, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is The a part of embodiment of the present invention, rather than the embodiment of whole.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
In a first aspect, a kind of visual development method at interface is embodiments provided, as shown in figure 1, including:
S101, the first numerical value for obtaining user input;
Wherein, the first numerical value here is that user is arranged according to physical constraint value finally to be obtained, and user is concrete How to arrange the first numerical value to be illustrated with the concept of unit binding occurrence in the lump in step s 102.
Additionally, the first numerical value of acquisition here, can obtain user to be changed in respective code relevant position in advance First numerical value, or a visual input window is provided the user before acquisition, then obtain user this The first numerical value being input in window, the embodiment of the present invention are not especially limited to this.
The ratio of S102, acquisition unit binding occurrence and the first numerical value is used as physical constraint value;Wherein, the unit constraint Value, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;
First it is noted that the current self-defined classification of binding occurrence here is that method provided in an embodiment of the present invention exists Before performing each step, user is with regard to pre-configured.It is understandable to be, for existing general constraints value classification, Other attributes of unit binding occurrence and binding occurrence defined in generic categories are all with the use scene specified, usually It is changeless.So if want to be changed unit binding occurrence, and the physical constraint value for causing to finally obtain is user The binding occurrence wanted, it is necessary to self-defined in advance that a new binding occurrence classification is set.This self-defined classification also defines this The corresponding unit binding occurrence of classification and other attributes, and the category can be supported for the change of unit binding occurrence.
The setting of next the first numerical value in being noted that unit binding occurrence here and step S101 is user Arranged according to the physical constraint value for finally wanting to obtain.It is understood that a purpose of the embodiment of the present invention is So that final physical constraint value is the floating number between 0 to 1, such as 0.5 or 0.3 etc..Due to pre-execution in step S102 The scale operation of unit binding occurrence and the first numerical value is so as to obtain physical constraint value, therefore the first numerical value here can be more than single Position binding occurrence.For example, the first numerical value is set every time for the ease of user, unit binding occurrence here can be configured to 1, And then the first numerical value here can just be set to larger than 1 real number, such as any real number between 2-10, so that Jing It can be the floating number between 0 to 1 to cross the result that scale operation obtains.
On the basis of this, method provided in an embodiment of the present invention can obtain the corresponding unit of the self-defined classification first Binding occurrence, and then obtain the ratio of unit binding occurrence and the first numerical value again, and using the ratio as physical constraint value, namely user Want the binding occurrence for obtaining, in case follow-up step is used.
S103, the size using view in physical constraint value setting interface and/or the position of view.
Specifically, after the physical constraint value for wanting to obtain is obtained, it is possible to which the physical constraint value is set to The size or relative position of a certain view, is carried out such that it is able to the display situation according to the actual requirements to each view in the page Planning is set.For example, after the result that step S102 has obtained that physical constraint value is 0.5, can be with step S103 Arrange a certain cut-off rule height be 0.5point, or arrange view A the leftmost side with the relative distance of the rightmost side of view B be 0.5point, point here can be understood as the meaning of binding occurrence, such that it is able to plan in the page height of cut-off rule and The relative position of view A and view B.
In the visual development method at interface provided in an embodiment of the present invention, first numerical value of user input is obtained first, Then the ratio for obtaining the corresponding unit binding occurrence of the self-defined classification of present confinement value and the first numerical value is worth to physical constraint value, most Physical constraint value is recycled to be configured the size of view in interface or position afterwards.As the first numerical value can be more than unit about Beam value, therefore the physical constraint value for obtaining can be the floating number between 0-1, so as to realize at visual development interface, depending on The size of figure or position can be constrained by the floating number between 0-1, are that developer's setting view brings great convenience. Additionally, method provided in an embodiment of the present invention is simply easily realized, technical risk is low and be able to can be widely applied with efficient multiplexing In visualization interface exploitation.
On the basis of above-described embodiment, the embodiment of the present invention a kind of visual development method again there is provided interface, such as Shown in Fig. 2, including:
S201, the first numerical value for obtaining user input;
S202, by performing the corresponding execution file of the self-defined classification of present confinement value obtaining unit binding occurrence and first The ratio of numerical value;Wherein, the unit binding occurrence, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;
S203, the size using view in physical constraint value setting interface and/or the position of view.
Wherein, here the step of, S201 was identical with step S103 with step S101 in above-described embodiment with step S203, To save length, will not be described here.Emphasis is described in detail to step S202 below.
It is after step S201 obtains the first numerical value, in step S202, self-defined according to current binding occurrence first The corresponding execution file of the title that the name search of classification prestores, specifically execution file here can for h files with And m files.Wherein, here h files and m files is that the text commonly used in iOS application views interface is developed using Xcode Part.H files are header file, each member variable in operation to be performed, the method for operation and other attributes for stating Etc.;M files are mainly used in the method for realizing h file states, that is to say, that comprising the detailed code for performing the method step.Can To be understood by, the h files for now getting and contain in m files it is being pre-configured with, for executable unit's binding occurrence with The code of the ratio computing of the first numerical value.Therefore after h files and m files is obtained, it is possible to by perform h files with And m files are obtaining the ratio of unit binding occurrence and the first numerical value, and then obtain physical constraint value and use for arranging view.
Further, here h files and m files is that, before the method for the present invention is performed, user passes through SubClassing What the constraint function of binding occurrence was obtained and was prestored.The constraint function of binding occurrence wherein here can be specially NSLayoutConstraint functions, the function can include the other constraints of the binding occurrence self defined class.
The concept of SubClassing is explained first.If carrying out SubClassing to a certain function, then can be the function As father's function, the process of SubClassing is exactly the process that subfunction is generated by father's function.Wherein subfunction has one with father's function Fixed general character, that is to say, that inherit the Some features of father's function, subfunction also has the characteristic of oneself, that is to say, that also with father The somewhat different part of function.Here NSLayoutConstraint is the constraint letter of the binding occurrence commonly used in visual development Number, in order that method provided in an embodiment of the present invention can either be met for some of binding occurrence are arranged in visual development, Can be realized in the embodiment of the present invention again for the particular/special requirement of physical constraint value, thus need in the embodiment of the present invention it is right NSLayoutConstraint functions carry out SubClassing.
For ease of understanding, below said process is illustrated.Here to arrange binding occurrence as 0.5 point height As a example by the cut-off rule of degree.
SubClassing NSLayoutConstraint, obtains following h files and m files.
A) .h files:(for stating which is IB_DESIGNABLE, that is to say and can change variable)
IB_DESIGNABLE
@interface ALOnePixelConstant:NSLayoutConstraint
@property(nonatomic)IBInspectable NSInteger onePixelConstant;
@end
B) .m files:(method for performing modification binding occurrence)
#import"ALOnePixelConstant.h"
@implementation ALOnePixelConstant
-(void)setOnePixelConstant:(NSInteger)onePixelConstant
{
_ onePixelConstant=onePixelConstant;
Self.constant=onePixelConstant*1.0/2;
}
@end
Wherein, the self-defining classification of binding occurrence is defined in h files and m files, also as identify in code " ALOnePixelConstant.h " classification.The sentence that be used to perform scale operation, namely m file inverse are included in m files also The sentence of the third line.Here self.constant represents final physical constraint value, onePixelConstant generations here Unit binding occurrence under table " ALOnePixelConstant.h " classification, do behind unit binding occurrence scale operation numerical value ( Be 2 in the code, can be described in detail to why being set to 2 here hereinafter) namely user input the first numerical value.
As the self-defined classification of binding occurrence defined in h files and m files is " ALOnePixelConstant.h " classification, Therefore before method provided in an embodiment of the present invention is performed, in the self-defined classification of the current binding occurrence of configuration, such as Fig. 3 institutes Show, user should be configured as " ALOnePixelConstant.h " classification.In this case, the embodiment of the present invention is being held During row step S202, will be found according to the other title of the self defined class " ALOnePixelConstant.h " being configured The corresponding above-mentioned h files of " ALOnePixelConstant.h " classification and m files.Search out above-mentioned h files and m files it Afterwards, the scale operation between unit binding occurrence and the first numerical value in m files is carried out, physical constraint value is obtained.Such as Fig. 3 institutes Show, as the corresponding unit binding occurrence of " ALOnePixelConstant.h " classification is configured to 1, and the reality that user obtains in advance Binding occurrence is 0.5, it is clear that the first numerical value here is accomplished by being configured to 2.By that analogy, if user obtains in advance next time Physical constraint value is 0.2, and the corresponding unit binding occurrence of " ALOnePixelConstant.h " classification is still configured to 1, that User now needs for the first numerical value to be configured to 5.
Said process can be summarized as:The physical constraint value that user obtains in advance is 0.5, is provided the embodiment of the present invention is performed Method before, the self-defined classification of binding occurrence is set to " ALOnePixelConstant.h " classification, the category pair by user The unit binding occurrence answered is 1.Therefore the first numerical value is configured to 2 by user.Then method provided in an embodiment of the present invention is obtained first The first numerical value 2 is taken, then judges that current binding occurrence classification, for " ALOnePixelConstant.h ", is arrived according to this name query Corresponding h files and m files, perform the h files and m files namely cause unit binding occurrence be 1 divided by the first numerical value 2, so as to Obtain physical constraint value 0.5.The size of the last view in using 0.5 pair of visualization interface of physical constraint value and/or position It is configured, so as to realize the purpose of the floating number for physical constraint value is obtained between 0-1, is easy to the visualization of developer Exploitation.
In the specific implementation, it is to be understood that arranged using physical constraint value in said method embodiment and regarded in interface The position of the size and/or view of figure namely step S103 and step S203 can be implemented in several ways, one of which Optionally embodiment is:Call automatic layout tool and using physical constraint value arrange interface in view size and/or regard The position of figure.
Specifically, can specifically call AutoLayout instruments here to carry out the autoplacement at interface, AutoLayout is a kind of instrument of the autoplacement commonly used in Xcode visual developments.Here, the embodiment of the present invention can be with By calling AutoLayout instruments, using AutoLayout instruments provide function by a certain view in interface or some The size of view and/or position are set to physical constraint value.Advantage of this is that, AutoLayout instruments can be made full use of Visual Performance, obtain want the physical constraint value for obtaining after, fast and effeciently physical constraint value can be applied and regarded In the setting of figure, and all visualized operations are operated, it is convenient to be succinctly easily achieved.
Additionally, in the specific implementation, " physical constraint is utilized in S103 and step S203 the step of said method embodiment Value arranges the size of view in interface and/or the position of view " can be specially:
Arranged using physical constraint value in interface when pre-editing view absolute dimension, such as view it is high or wide etc. Deng.Can also arrange when the view of pre-editing is relative to father's view or the relative position relative to fraternal view.Father's view is general Can be the front view at interface, sub- view can be the small-view in father's view, such as the little button in the one big page, son are regarded Mutually it is referred to as fraternal view between figure and sub- view.Active view can also be set relative to father's view or relative to fraternal view Alignment thereof, such as active view are located at the middle position of father's view, with fraternal view horizontal alignment etc..
Second aspect, embodiments provides a kind of visual development device at interface, as shown in figure 4, including:Number Value acquiring unit 401, arithmetic element 402 and view setting unit 403.
Wherein, numerical value acquiring unit 401 obtains the first numerical value of user input;Arithmetic element 402 obtains unit binding occurrence With the ratio of the first numerical value as physical constraint value;Wherein, the unit binding occurrence, is the self-defined classification institute of current binding occurrence Corresponding unit binding occurrence;View setting unit 403 utilizes the physical constraint value to arrange the size of view in interface and/or regard The position of figure.
In the visual development device at interface provided in an embodiment of the present invention, numerical value acquiring unit 401 obtains user first First numerical value of input, then arithmetic element 402 obtain the corresponding unit binding occurrence of the self-defined classification of present confinement value and first The ratio of numerical value is worth to physical constraint value, and last view setting unit 403 recycles chi of the physical constraint value to view in interface Very little or position is configured.As the first numerical value can be more than unit binding occurrence, therefore the physical constraint value for obtaining can be 0-1 Between floating number, so as to realize at visual development interface, the size of view or position can be by the floating numbers between 0-1 Constrained, be that developer's setting view brings great convenience.Additionally, device provided in an embodiment of the present invention is simple easily real Existing, technical risk is low and can be can be widely used in visualization interface exploitation with efficient multiplexing.
In the specific implementation, arithmetic element 402 here can also be further used for:By perform present confinement value from The corresponding execution file of classification is defined, the ratio of unit binding occurrence and the first numerical value is obtained.That is, arithmetic element 402 The corresponding execution file of the title for being prestored according to the current other name search of binding occurrence self defined class first, specifically may be used Think corresponding h files and m files.After h files and m files is obtained, by perform h files and m files come The ratio of unit binding occurrence and the first numerical value is obtained, and then obtains physical constraint value and used for arranging view.Here h files And m files have carried out detailed explanation above, will not be described here.
Further, here h files and m files is that device provided in an embodiment of the present invention is implementing corresponding operation Before, user is obtained by the constraint function of SubClassing binding occurrence and is prestored, and is specifically as follows by SubClassing NSLayoutConstraint functions are obtained.With regard to SubClassing NSLayoutConstraint functions content also front Detailed explanation is carried out in text, will not be described here.
In addition in the specific implementation, view setting unit 403 here can call automatic layout tool (to be specifically as follows AutoLayout instruments) using physical constraint value, the size of view and/or the position of view in interface are set.Here view sets Put unit 403 arrange view size and/or view position, can be using physical constraint value arrange interface in view it is exhausted To size, and/or view is relative to father's view or the relative position relative to fraternal view, and/or view is relative to father's view Or relative to the alignment thereof of fraternal view.With regard to calling the content that AutoLayout instruments and view are arranged also front Text has carried out corresponding explanation.
Additionally, Fig. 5 illustrates electronic devices structure block diagram provided in an embodiment of the present invention.
With reference to Fig. 5, the electronic equipment can include:Processor (processor) 51, memorizer (memory) 52 and total Line 53;
Wherein,
The processor 51 and memorizer 52 complete mutual communication by the bus 55;
The processor 51 is used to call the programmed instruction in the memorizer 52, to perform above-mentioned each method embodiment institute The method of offer, for example, include:Obtain the first numerical value of user input;Obtain the ratio conduct of unit binding occurrence and the first numerical value Physical constraint value;Wherein, the unit binding occurrence, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;Profit With the physical constraint value, the size of view and/or the position of view in interface are set.
The embodiment of the present invention is also disclosed a kind of computer program, the computer program include being stored in it is non-temporarily Computer program on state computer-readable recording medium, the computer program include programmed instruction, when described program is instructed When being computer-executed, computer is able to carry out the method provided by above-mentioned each method embodiment, for example, include:Obtain user defeated The first numerical value for entering;The ratio of unit binding occurrence and the first numerical value is obtained as physical constraint value;Wherein, the unit constraint Value, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;Arranged using the physical constraint value and regarded in interface The position of the size and/or view of figure.
The embodiment of the present invention also provides a kind of non-transient computer readable storage medium storing program for executing, and the non-transient computer is readable to deposit Storage media stores computer instruction, and the computer instruction makes the computer perform the side provided by above-mentioned each method embodiment Method, for example, include:Obtain the first numerical value of user input;The ratio of unit binding occurrence and the first numerical value is obtained as physical constraint Value;Wherein, the unit binding occurrence, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;Using the reality Border binding occurrence arranges the size of view in interface and/or the position of view.
Understandable to be, the illustration in above-described embodiment is only to facilitate more fully understand the embodiment of the present invention The method or apparatus of offer, can not constitute the concrete restriction to the present invention.And between each above-mentioned preferred implementation not Can influence each other, the scheme obtained by combination in any between each preferred implementation should fall into the protection model of the present invention Enclose.
Device embodiment described above is only schematic, wherein the unit as separating component explanation can To be or may not be physically separate, as the part that unit shows can be or may not be physics list Unit, you can local to be located at one, or can also be distributed on multiple NEs.Which is selected according to the actual needs can In some or all of module realizing the purpose of this embodiment scheme.Those of ordinary skill in the art are not paying creativeness Work in the case of, you can to understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can By software plus required general hardware platform mode realizing, naturally it is also possible to by hardware.Based on such understanding, on State the part that technical scheme substantially contributes prior art in other words to embody in the form of software product, should Computer software product can be stored in a computer-readable storage medium, such as ROM/RM, magnetic disc, CD etc., including some fingers Order is used so that a computer equipment (can be personal computer, server, or network equipment etc.) performs each enforcement Method described in some parts of example or embodiment.
Finally it should be noted that:Above example only to illustrate technical scheme, rather than a limitation;Although With reference to the foregoing embodiments the present invention has been described in detail, it will be understood by those within the art that:Which still may be used To modify to the technical scheme described in foregoing embodiments, or equivalent is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and Scope.

Claims (10)

1. a kind of visual development method at interface, it is characterised in that include:
Obtain the first numerical value of user input;
The ratio of unit binding occurrence and the first numerical value is obtained as physical constraint value;Wherein, the unit binding occurrence, is current Unit binding occurrence corresponding to the self-defined classification of binding occurrence;
Using the physical constraint value, the size of view and/or the position of view in interface are set.
2. method according to claim 1, it is characterised in that the ratio of the acquisition unit binding occurrence and the first numerical value, Including:
The ratio of unit binding occurrence and the first numerical value is obtained by performing the corresponding execution file of the self-defined classification of present confinement value Value.
3. method according to claim 2, it is characterised in that the execution file is the constraint by SubClassing binding occurrence What function was obtained, the constraint function of the binding occurrence includes the other constraints of the binding occurrence self defined class.
4. according to the arbitrary described method of claim 1-3, it is characterised in that described to arrange interface using the physical constraint value The position of the size and/or view of middle view, including:
Call automatic layout tool that the size of view and/or the position of view in interface are set using the physical constraint value.
5. according to the arbitrary described method of claim 1-3, it is characterised in that described to arrange interface using the physical constraint value The position of middle view, including:
The view is set relative to father's view or the relative position relative to fraternal view using the physical constraint value, and/ Or the view is relative to father's view or the alignment thereof relative to fraternal view.
6. the visual development device at a kind of interface, it is characterised in that include:
Numerical value acquiring unit, for obtaining the first numerical value of user input;
Arithmetic element, for obtaining the ratio of unit binding occurrence and the first numerical value as physical constraint value;Wherein, the unit is about Beam value, is the unit binding occurrence corresponding to the self-defined classification of current binding occurrence;
View setting unit, for arranging the size of view and/or the position of view in interface using the physical constraint value.
7. device according to claim 6, it is characterised in that the arithmetic element is further used for:
By the corresponding execution file of self-defined classification for performing present confinement value, unit binding occurrence and the first numerical value are obtained Ratio.
8. device according to claim 7, it is characterised in that the execution file is the constraint by SubClassing binding occurrence What function was obtained, the constraint function of the binding occurrence includes the other constraints of the binding occurrence self defined class.
9. according to the arbitrary described device of claim 6-8, it is characterised in that the view setting unit is further used for:
Call automatic layout tool that the size of view and/or the position of view in interface are set using the physical constraint value.
10. according to the arbitrary described device of claim 6-8, it is characterised in that the view setting unit is further used for:
The view is set relative to father's view or the relative position relative to fraternal view using the physical constraint value, and/ Or the view is relative to father's view or the alignment thereof relative to fraternal view.
CN201610942178.7A 2016-10-31 2016-10-31 Visualized interface development method and device Pending CN106528115A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610942178.7A CN106528115A (en) 2016-10-31 2016-10-31 Visualized interface development method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610942178.7A CN106528115A (en) 2016-10-31 2016-10-31 Visualized interface development method and device

Publications (1)

Publication Number Publication Date
CN106528115A true CN106528115A (en) 2017-03-22

Family

ID=58293168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610942178.7A Pending CN106528115A (en) 2016-10-31 2016-10-31 Visualized interface development method and device

Country Status (1)

Country Link
CN (1) CN106528115A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577490A (en) * 2017-08-03 2018-01-12 武汉斗鱼网络科技有限公司 View autoplacement method and device in a kind of iOS
CN107844358A (en) * 2017-11-22 2018-03-27 北京酷我科技有限公司 A kind of iOS interfaces fast layout strategy
CN108415703A (en) * 2018-02-08 2018-08-17 武汉斗鱼网络科技有限公司 A kind of quick interface arrangement method, device, electronic equipment and storage medium
CN109558201A (en) * 2018-12-11 2019-04-02 南威软件股份有限公司 A kind of interface iOS simplified topology method based on UIScrollView

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface
CN104699376A (en) * 2015-04-03 2015-06-10 上海航天测控通信研究所 Automatic control layout method
CN104915201A (en) * 2015-05-29 2015-09-16 北京奇艺世纪科技有限公司 Interface generating method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239044A (en) * 2014-09-05 2014-12-24 北京航天自动控制研究所 Dynamic generation method for graphical user interface
CN104699376A (en) * 2015-04-03 2015-06-10 上海航天测控通信研究所 Automatic control layout method
CN104915201A (en) * 2015-05-29 2015-09-16 北京奇艺世纪科技有限公司 Interface generating method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MERCY: ""在Xib中绘制1像素的线"", 《HTTP://BLOG.IMERC.CC/2015/11/17/DWAW-ONE-PIXAL-LINE-USING-XIB/》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577490A (en) * 2017-08-03 2018-01-12 武汉斗鱼网络科技有限公司 View autoplacement method and device in a kind of iOS
CN107844358A (en) * 2017-11-22 2018-03-27 北京酷我科技有限公司 A kind of iOS interfaces fast layout strategy
CN108415703A (en) * 2018-02-08 2018-08-17 武汉斗鱼网络科技有限公司 A kind of quick interface arrangement method, device, electronic equipment and storage medium
CN108415703B (en) * 2018-02-08 2022-01-04 武汉斗鱼网络科技有限公司 Interface layout method and device, electronic equipment and storage medium
CN109558201A (en) * 2018-12-11 2019-04-02 南威软件股份有限公司 A kind of interface iOS simplified topology method based on UIScrollView

Similar Documents

Publication Publication Date Title
CN108228287B (en) QT-based user interface control generation method and device
CN106062711B (en) Method, system, and computer storage medium for compound controls
US9792354B2 (en) Context aware user interface parts
CN106528115A (en) Visualized interface development method and device
US9977655B2 (en) System and method for automatic extraction of software design from requirements
CN105138340A (en) Interaction method and system for Native and Web pages
CN110941614A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN109471580B (en) Visual 3D courseware editor and courseware editing method
CN112445564B (en) Interface display method, electronic device and computer readable storage medium
CN113031946A (en) Method and device for rendering page component
CN112668290A (en) Dynamic form generation method and system based on gridding design
CN107592334A (en) A kind of information popularization method, apparatus and equipment
CN112650966A (en) Method, generator and medium for generating dynamic list page of online design
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
CN113590104A (en) Platform and method for realizing graphical code-free software development, computer equipment and storage medium
CN109885301A (en) A kind of generation method of scalable vector graphics, device, storage medium and equipment
CN110781425B (en) Display method, device and equipment of mobile terminal H5 page and storage medium
CN110688109A (en) Model editing system and creation method thereof
US10289388B2 (en) Process visualization toolkit
CN114741071A (en) Application construction method and device
CN104375814A (en) Generation method and device of an interface document
KR101912931B1 (en) Software development method, device, and computer readable medium based on object oriented block
CN102541544A (en) Method, device and system for processing tree control
CN107832088A (en) Control application method and device, computing device, computer-readable storage medium
CN104267954B (en) The generation method and device of a kind of part included in user interface

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170322

WD01 Invention patent application deemed withdrawn after publication