WO2018223593A1 - 分段选择视图呈现方法、装置及用户终端 - Google Patents

分段选择视图呈现方法、装置及用户终端 Download PDF

Info

Publication number
WO2018223593A1
WO2018223593A1 PCT/CN2017/109569 CN2017109569W WO2018223593A1 WO 2018223593 A1 WO2018223593 A1 WO 2018223593A1 CN 2017109569 W CN2017109569 W CN 2017109569W WO 2018223593 A1 WO2018223593 A1 WO 2018223593A1
Authority
WO
WIPO (PCT)
Prior art keywords
segment
segmentation
selection view
view
user
Prior art date
Application number
PCT/CN2017/109569
Other languages
English (en)
French (fr)
Inventor
张华兵
张文明
陈少杰
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2018223593A1 publication Critical patent/WO2018223593A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Definitions

  • the present invention relates to the field of interface display technologies, and in particular, to a segment selection view presentation method, apparatus, and user terminal.
  • the segmentation selection control is the core of the segmentation selection view.
  • the representation of the segmentation control is also diverse, but as the number of elements increases, the complexity increases.
  • the UISegmentedControl provided by the iOS system can meet the simple requirements, but it is difficult to meet the complex style and has poor customizability.
  • Other implementations are also biased towards the customization of segmentation elements, such as the background of selected elements, animations, etc., making the flexibility of segmentation selection view design relatively low.
  • the present invention provides a segment selection view presentation method, the method comprising: acquiring a user in the segment selection view in response to a segmentation element triggering instruction triggered by a user in a segment selection view a target segmentation element selected from the plurality of segmentation elements, wherein the segmentation selection view is a scroll view; scrolling the plurality of segmentation elements in the segmentation selection view based on a preset segmentation selection view style To move the target segmentation element to a preset location.
  • the present invention provides a segmentation selection view presentation method, which is applied to an IOS system.
  • a user terminal displaying a segment selection view, the segment selection view being implemented by a segment selection view subclass, the segment selection view subclass inheriting from a UIView; the segment selection view subclass A plurality of preset interface layout functions are included; the method includes:
  • the segment selection view subclass calls back the interface layout function through a proxy mode, and controls an interface layout of the segmentation selection view according to the obtained interface layout parameter.
  • the present invention provides a segment selection view presentation device, the device comprising: a segmentation element module configured to acquire a user in response to a segmentation element triggering instruction triggered by a user in a segment selection view The segment selects a target segment element selected from the plurality of segment elements in the view, wherein the segment selection view is a scroll view; the position adjustment module is configured to select a view style based on the preset segmentation The plurality of segmentation elements are scrolled in the segment selection view to move the target segmentation element to a preset location.
  • the present invention provides a segment selection view presentation device, the device being applied to a user terminal of an IOS system, the user terminal displaying a segment selection view, and the segment selection view is selected by a segment a view subclass implementation, the segment selection view subclass inherits from a UIView; the segment selection view subclass includes a preset plurality of interface layout functions; the device includes:
  • a parameter acquisition module configured to obtain an input interface layout parameter through an interface layout function
  • a layout module configured to call back the interface layout function by a proxy mode, and control an interface layout of the segmentation selection view according to the obtained interface layout parameter.
  • the present invention provides a user terminal, the user terminal including a processor and a memory, the memory coupled to the processor, the memory storing an instruction when the instruction is executed by the processor
  • the user terminal performs the following operations: in response to a segmentation element triggering instruction triggered by the user in the segment selection view, acquiring a target segmentation element selected by the user among the plurality of segmentation elements in the segmentation selection view, Wherein the segment selection view is a scroll view; scrolling the plurality of segment elements in the segment selection view based on a preset segment selection view style to move the target segmentation element to a preset position.
  • the present invention provides a computer readable storage medium storing one or more executable instructions that, when executed by at least one processor, implement the segmentation selection provided by the present invention View rendering method.
  • An embodiment of the present invention provides a segment selection view presentation method, apparatus, and user terminal, which acquires a user in the segment selection view by responding to a segment element triggering instruction triggered by a user in a segment selection view.
  • FIG. 1 is a structural block diagram of a user terminal applicable to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a user terminal interaction interface of a segment selection view presentation method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for presenting a segment selection view according to a first embodiment of the present invention
  • FIG. 4 is a flowchart of a method for presenting a segment selection view according to a second embodiment of the present invention.
  • FIG. 5 is a structural block diagram of a segment selection view presenting apparatus according to a third embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a segment selection view presenting apparatus according to a fourth embodiment of the present invention.
  • FIG. 1 shows a block diagram of a structure of a user terminal 100 that can be applied to an embodiment of the present invention.
  • the user terminal 100 includes a memory 101, a memory controller 102, one or more (only one shown) processor 103, peripheral interface 104, radio frequency module 105, audio module 106, and touch. Screen 107 and the like. These components communicate with one another via one or more communication bus/signal lines 108.
  • the memory 101 can be configured to store a software program and a module, such as a segment selection view presentation method and a program instruction/module corresponding to the device in the embodiment of the present invention, and the processor 103 runs the software program and the module stored in the memory 101, thereby Performing various function applications and data processing, such as the segment selection view provided by the embodiment of the present invention Current method.
  • a software program and a module such as a segment selection view presentation method and a program instruction/module corresponding to the device in the embodiment of the present invention
  • the processor 103 runs the software program and the module stored in the memory 101, thereby Performing various function applications and data processing, such as the segment selection view provided by the embodiment of the present invention Current method.
  • Memory 101 can include high speed random access memory and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. Access to the memory 101 by the processor 103 and other possible components can be performed under the control of the memory controller 102.
  • non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. Access to the memory 101 by the processor 103 and other possible components can be performed under the control of the memory controller 102.
  • Peripheral interface 104 couples various input/output devices to processor 103 and memory 101.
  • peripheral interface 104, processor 103, and memory controller 102 can be implemented in a single chip. In other instances, they can be implemented by separate chips.
  • the radio frequency module 105 is configured to receive and transmit electromagnetic waves, and realize mutual conversion between electromagnetic waves and electric signals, thereby communicating with a communication network or other devices.
  • the audio module 106 provides an audio interface to the user, which may include one or more microphones, one or more speakers, and audio circuitry.
  • the touch screen 107 simultaneously provides an output and input interface between the user terminal 100 and the user. Specifically, the touch screen 107 displays video output to the user, and the content of the video output may include text, graphics, video, and any combination thereof.
  • FIG. 1 is merely illustrative, and the user terminal 100 may further include more or less components than those shown in FIG. 1, or have a different configuration from that shown in FIG. 1.
  • the components shown in Figure 1 can be implemented in hardware, software, or a combination thereof.
  • the client terminal 100 is installed with a client, and the client may be a browser or a third-party application software, and corresponds to a server (Server) to provide services for the user, such as an e-book reading service. For playing local documents or e-books.
  • a server Server
  • FIG. 2 is a schematic diagram of a user terminal interaction interface of a segment selection view presentation method according to an embodiment of the present invention. The following implementation process may be understood by referring to the figure.
  • the segment selection view is used to present different segment elements so that the user can click on the segment elements to present content corresponding to the segment elements in the content display view.
  • the segment selection view is implemented by the segment selection control.
  • FIG. 3 is a flowchart of a method for presenting a segment selection view according to a first embodiment of the present invention. The method specifically includes the following steps:
  • Step S110 Acquire a target segment element selected by the user among the plurality of segment elements in the segment selection view, in response to the segment element triggering instruction triggered by the user in the segment selection view, wherein the segment Select the view as a scroll view.
  • the user terminal 100 may be an IOS system, and the user terminal 10 displays a segment selection view, and the segment selection view is implemented by a segment selection view subclass, the segment selection view Subclasses inherit from UIView.
  • the segment selection view subclass includes a preset plurality of interface layout functions.
  • the input interface layout parameters can be obtained through the interface layout function.
  • the segment selection view subclass calls back the interface layout function through a proxy mode, and controls an interface layout of the segmentation selection view according to the obtained interface layout parameter.
  • the user terminal 100 may acquire the number of segment elements to be displayed, and obtain, for each of the segment elements, interface layout parameters of the segment elements.
  • the segment selection view subclass lays out an interface of the segment selection view according to interface layout parameters of the segment elements, and displays the segment elements on the segment selection view interface.
  • the segment selection view can be configured as a scroll view by first selecting a view subclass (SegmentControll) by creating a segment that inherits from UIView, and adding a inheritance from the UIScrollView scroll view (scrollView), which is responsible for carrying more Segmentation elements such that the plurality of segmentation elements can be scrolled in the segmentation selection view, enabling the segmentation selection view to be a scrolling view.
  • the scrolling mode generally scrolls horizontally along the segment selection view.
  • the user triggers the segmentation element in the user terminal by using a gesture, so a click gesture is added to the segment selection view (SegmentControll), and a gesture response method (SegmentClicked:) is added, and the gesture can be various, for example, A gesture of clicking a segmented element with a finger, a pull-up or pull-down gesture, a horizontal swipe gesture, and the like. Then, the corresponding gesture when the user triggers the segmentation element in the segment selection view is obtained, and the gesture can be responded to by the above method to trigger the segmentation element trigger instruction.
  • a click gesture is added to the segment selection view (SegmentControll), and a gesture response method (SegmentClicked:) is added
  • the gesture can be various, for example, A gesture of clicking a segmented element with a finger, a pull-up or pull-down gesture, a horizontal swipe gesture, and the like.
  • the index of the segment element triggered by the gesture in the segment selection view may also be obtained, wherein the selectIndex attribute has been added in advance for each segment element, and the attribute is used to specify The index of the segmentation element currently selected by the user.
  • a segment element base class (SegmentItem) that inherits from UIView can be newly created, and a BOOL type property is added: selected, indicating whether the segmentation element is used by the user.
  • Trigger such as the selected attribute of the segmentation element is set to NO, indicating that it is not triggered, the selected attribute of the segmentation element is set to YES, indicating that it is triggered; the attribute of CGFloat type: contentAlpha, indicating the degree of occurrence (0 to 1), Convenient for making over-effects of segmentation elements in segmented selection views.
  • Subclasses can override the get and set of properties The method is to customize the style and animation of the segmented element that is triggered, and the base class has no specific implementation. The style is completely specified by the subclass itself, which is very flexible.
  • the attribute of the segment element at the index may be set to Yes based on the index to indicate that the segment element is triggered by the user, and of course, the segment element needs to be triggered.
  • the attribute value of the previous triggered segment element is set to No, indicating that the previously triggered segment element is not currently triggered by the user, that is, the segment element that was triggered from the previous segment is replaced with the currently triggered segment.
  • the segment element is obtained, so that the user terminal acquires the segment element trigger instruction that the user triggers the segment element generation in the segment selection view.
  • the user terminal acquires, in response to the segment element triggering instruction, a target segment element selected by the user among the plurality of segment elements in the segment selection view, where the target segment element is the above-mentioned user-triggered segment Segment element.
  • the method for obtaining the segment element index may be obtained by traversing an array storing a plurality of segment elements, and the creation of the array is performed in the configuration of the segment selection view, and the segment selection view is performed.
  • the specific configuration process is:
  • the data source protocol defines a series of data source protocol methods for specifying the number of segment elements (numberOfItems), the width of each segment element (widthForItemAtIndex:), segmentation elements (itemForIndex:), segmentation. Select the view style (SelectType) and the width of the segment indicator (widthForIndicatorAtIndex:).
  • the proxy protocol defines a set of proxy protocol methods, including callbacks that click on segmentation elements (didSelectItemAtIndex:).
  • the content corresponding to the target segmentation element may be displayed in the content display view by calling a callback method didSelectItemAtIndex: by a trigger, each segment element being preset with a corresponding display Content, for example, the segmentation element "hot game” corresponds to related game content, such as live video of each hot game; the segmentation element "entertainment” corresponds to entertainment-related content, such as very video.
  • the segment selection view presentation method provided in this embodiment can freely and flexibly customize segmentation elements of different styles, and performance of segmentation elements in different states.
  • Step S120 scrolling the plurality of segment elements in the segment selection view based on a preset segment selection view style to move the target segment element to a preset position.
  • Selecting a view style (SelectType) according to a segment set by a data source including but not limited to three types of centering, left and right, and selecting the view style according to the segments to scroll the plurality of segment elements to Moving the target segmentation element to a preset position
  • selectType a view style
  • the position of the target element can be automatically scrolled by multiple segmentation elements, and the target segmentation element is adjusted to the above three styles.
  • One of them may also move the target segmentation element to a preset position by scrolling the plurality of segmentation elements.
  • the preset location user can be set according to his own habits or user experience. For example, as shown in FIG. 2, the target segmentation element can be moved to the sides or the middle of the segment selection view, or the segment selection view is selected. Any visual position, which enables dynamic adjustment of the position of the target segmentation element.
  • a segment selection view presentation method provided by the first embodiment of the present invention obtains a plurality of points of a user in the segment selection view by triggering an instruction in response to a segmentation element triggered by a user in a segment selection view. a target segment element selected from the segment elements, wherein the segment selection view is a scroll view, and then scrolling the plurality of elements in the segment selection view based on a preset segment selection view style to The target segmentation element is moved to the preset position, so that the dynamic adjustment of the position of the segmentation element can be realized, and the flexibility of the segmentation selection view design is improved.
  • FIG. 4 is a flowchart of a method for presenting a segment selection view according to a second embodiment of the present invention. The method specifically includes the following steps:
  • Step S210 Acquire a target segment element selected by the user among the plurality of segment elements in the segment selection view, in response to the segment element trigger instruction triggered by the user in the segment selection view, wherein the segment Select the view as a scroll view.
  • step S110 For a specific implementation of the step, refer to the detailed description in step S110 in the first embodiment. For brevity of the description, no further details are provided herein.
  • Step S220 scrolling the plurality of segment elements in the segment selection view based on a preset segment selection view style to move the target segment element to a preset position.
  • step S120 For a specific implementation of the step, refer to the detailed description in step S120 in the first embodiment. For the sake of brevity of description, no further details are provided herein.
  • Step S230 Moving the pre-created segmentation indicator to the preset position, the segmentation indicator being configured to identify the segmentation element selected by the user.
  • the sub-element is also added when configuring the segmentation element.
  • Segment indicator view, and open its properties you can design different styles for the segment indicator, for example, you can design the color, height, width and whether to hide the segment indicator, the segment indication
  • the device is configured to identify the segmentation element selected by the user. For example, if the target segmentation element is triggered by the user, that is, selected by the user, the segmentation indicator is at the position of the target segmentation element, if the target is divided When the segment element moves to the preset position, the segment indicator also moves to the preset position along with the target segment element to identify that the target segment element is the segment element selected by the current user.
  • a segment selection view presentation method obtains a plurality of points of a user in the segment selection view by triggering an instruction in response to a segmentation element triggered by a user in a segment selection view.
  • a target segment element selected from the segment elements wherein the segment selection view is a scroll view, and then scrolling the plurality of elements in the segment selection view based on a preset segment selection view style to
  • the target segmentation element is moved to the preset position, and the segmentation indicator for identifying the segmentation element selected by the user is moved to the preset position, so that the position of the segmentation element can be realized.
  • the dynamic adjustment improves the flexibility of the segment selection view design.
  • FIG. 5 is a structural block diagram of a segment selection view presentation apparatus 200 according to a third embodiment of the present invention.
  • the device includes:
  • Obtaining a segmentation element module 210 configured to acquire, in response to a segmentation element triggering instruction triggered by the user in the segmentation selection view, a target segmentation element selected by the user among the plurality of segmentation elements in the segmentation selection view,
  • the segment selection view is a scroll view.
  • the position adjustment module 220 is configured to scroll the plurality of segment elements in the segment selection view based on a preset segment selection view style to move the target segment element to a preset position.
  • the device further includes:
  • a display module configured to display content corresponding to the target segmentation element in a content display view.
  • Obtaining a gesture module configured to obtain a corresponding gesture when the user triggers the segmentation element in the segment selection view.
  • the responsive gesture module is configured to respond to the gesture to trigger a segmentation element triggering instruction.
  • An index acquisition module configured to obtain an index of a segmentation element triggered by a user in the segment selection view.
  • a triggering representation module configured to set an attribute of the segmentation element at the index to YES based on the index to indicate that the segmentation element is triggered by a user, and the acquiring user triggers the segment in the segmentation selection view
  • the segmentation element generated by the segment element triggers the instruction.
  • FIG. 6 is a structural block diagram of a segment selection view presenting apparatus 300 according to a fourth embodiment of the present invention.
  • the device includes:
  • Obtaining a segmentation element module 310 configured to trigger a segmentation element triggering finger in response to a user triggering in the segmentation selection view And obtaining, by the user, a target segment element selected from a plurality of segment elements in the segment selection view, wherein the segment selection view is a scroll view.
  • the position adjustment module 320 is configured to scroll the plurality of segment elements in the segment selection view based on a preset segment selection view style to move the target segment element to a preset position.
  • the indication module 330 is configured to move the pre-created segmentation indicator to the preset location, the segmentation indicator configured to identify a segmentation element selected by the user.
  • a fifth embodiment of the present invention provides a segment selection view presentation device, which is applied to a user terminal of an IOS system, the user terminal displays a segment selection view, and the segment selection view selects a view through a segment Subclass implementation, the segmentation view subclass inherits from UIView.
  • the segment selection view subclass includes a preset plurality of interface layout functions; the device includes:
  • a parameter acquisition module configured to obtain an input interface layout parameter through an interface layout function
  • a layout module configured to call back the interface layout function by a proxy mode, and control an interface layout of the segmentation selection view according to the obtained interface layout parameter.
  • the parameter obtaining module acquires the number of segment elements to be displayed, and obtains interface layout parameters of the segment elements for each of the segment elements.
  • the layout module lays out an interface of the segment selection view according to interface layout parameters of the segmentation elements, and displays the segmentation elements on the segment selection view interface.
  • an embodiment of the present invention provides a segment selection view presentation method, apparatus, and user terminal, which acquires a user in the segment by responding to a segment element triggering instruction triggered by a user in a segment selection view. Selecting a target segmentation element selected from a plurality of segmentation elements in the view, wherein the segmentation selection view is a scroll view, and then scrolling in the segmentation selection view based on a preset segmentation selection view style A plurality of elements are used to move the target segmentation element to a preset position, thereby realizing dynamic adjustment of the position of the target segmentation element, and improving the flexibility of the segmentation selection view design.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that in some alternative implementations, the functions noted in the box may also be The same sequence as noted in the drawings occurs.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present invention may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the functions, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • An embodiment of the present invention provides a segment selection view presentation method, apparatus, and user terminal, which acquires a user in the segment selection view by responding to a segment element triggering instruction triggered by a user in a segment selection view.
  • An embodiment of the present invention provides a segment selection view presentation method and apparatus, and a user terminal.
  • the proxy mode enables a user to adjust each interface layout parameter in the segment selection view subclass, and the segment selection view subclass passes Call back these interface layout parameters to unify the layout. This enables different segmentation control controls to be implemented as needed.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

提供一种分段选择视图呈现方法、装置及用户终端,属于界面显示领域。所述方法通过响应于用户在分段选择视图中触发的分段元素触发指令,来获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图,然后基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个元素,以使所述目标分段元素移动到预设位置。从而实现了目标分段元素的位置的动态调整,提高了分段选择视图设计的灵活性。

Description

分段选择视图呈现方法、装置及用户终端
相关申请的交叉引用
本申请要求于2017年06月05日提交中国专利局的申请号为2017104160179、名称为“分段选择视图呈现方法、装置及用户终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及界面显示技术领域,具体而言,涉及一种分段选择视图呈现方法、装置及用户终端。
背景技术
基于iOS系统的移动终端APP上,在很多场景中,由于内容的多样性,往往通过分段选择视图来将不同的信息呈现在一个视图当中,用户只需在分段选择控件上点击不同的元素就可以随意切换浏览不同信息,从而达到减少跳转,提高用户体验的目的。
目前,大多数iOS系统的APP上都会在或多或少的场景中会出现分段选择视图,而分段选择控件是分段选择视图的核心。在不同场景中,为了满足不同的视觉需要,分段选择控件的表现形式也是多种多样,但是随着元素个数的增加,复杂度随之上升。然而,目前iOS系统提供的分段选择控件UISegmentedControl可以满足简单的需求,但对于复杂样式却难以满足,可定制性差。而其他实现方案也多偏向于分段元素的定制,比如选中元素的背景、动画等,使得分段选择视图设计的灵活性相对不高。
发明内容
有鉴于此,本发明的目的在于提供一种分段选择视图呈现方法、装置及用户终端,以改善上述问题。
第一方面,本发明提供了一种分段选择视图呈现方法,所述方法包括:响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图;基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
第二方面,本发明提供了一种分段选择视图呈现方法,所述方法应用于IOS系统的用 户终端,所述用户终端显示一分段选择视图,所述分段选择视图通过一分段选择视图子类实现,所述分段选择视图子类继承于UIView;所述分段选择视图子类包括预设的多个界面布局函数;所述方法包括:
通过界面布局函数获得输入的界面布局参数;
所述分段选择视图子类通过代理模式回调所述界面布局函数,并根据获得的界面布局参数控制所述分段选择视图的界面布局。
第三方面,本发明提供了一种分段选择视图呈现装置,所述装置包括:获取分段元素模块,配置成响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图;位置调整模块,配置成基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
第三方面,本发明提供了一种分段选择视图呈现装置,所述装置应用于IOS系统的用户终端,所述用户终端显示一分段选择视图,所述分段选择视图通过一分段选择视图子类实现,所述分段选择视图子类继承于UIView;所述分段选择视图子类包括预设的多个界面布局函数;所述装置包括:
参数获取模块,配置成通过界面布局函数获得输入的界面布局参数;
布局模块,配置成所述分段选择视图子类通过代理模式回调所述界面布局函数,并根据获得的界面布局参数控制所述分段选择视图的界面布局。
第五方面,本发明提供了一种用户终端,所述用户终端包括处理器以及存储器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述用户终端执行以下操作:响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图;基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
第六方面,本发明提供了一种计算机可读存储介质,存储有一个或多个可执行的指令,所述指令在被至少一个处理器执行时,实现本发明提供的所述的分段选择视图呈现方法。
本发明实施例的有益效果是:
本发明实施例提供一种分段选择视图呈现方法、装置及用户终端,通过响应于用户在分段选择视图中触发的分段元素触发指令,来获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图,然后基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个元素,以使所述目标分段元素移动到预设位置,从而可以实现对于分段元素的位置的动态调整,提高了分段选择视图设计的灵活 性。
本发明的其他特征和优点将在随后的说明书阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明实施例了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了一种可应用于本发明实施例中的用户终端的结构框图;
图2为本发明实施例提供一种分段选择视图呈现方法的用户终端交互界面的示意图;
图3为本发明第一实施例提供的一种分段选择视图呈现方法的流程图;
图4为本发明第二实施例提供的一种分段选择视图呈现方法的流程图;
图5为本发明第三实施例提供一种分段选择视图呈现装置的结构框图;
图6为本发明第四实施例提供一种分段选择视图呈现装置的结构框图。
具体实施方式
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本发明的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
图1示出了一种可应用于本发明实施例中的用户终端100的结构框图。如图1所示,用户终端100包括可以存储器101、存储控制器102,一个或多个(图中仅示出一个)处理器103、外设接口104、射频模块105、音频模块106、触控屏幕107等。这些组件通过一条或多条通讯总线/信号线108相互通讯。
存储器101可配置成存储软件程序以及模块,如本发明实施例中的分段选择视图呈现方法以及装置对应的程序指令/模块,处理器103通过运行存储在存储器101内的软件程序以及模块,从而执行各种功能应用以及数据处理,如本发明实施例提供的分段选择视图呈 现方法。
存储器101可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。处理器103以及其他可能的组件对存储器101的访问可在存储控制器102的控制下进行。
外设接口104将各种输入/输出装置耦合至处理器103以及存储器101。在一些实施例中,外设接口104,处理器103以及存储控制器102可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。
射频模块105配置成接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。
音频模块106向用户提供音频接口,其可包括一个或多个麦克风、一个或者多个扬声器以及音频电路。
触控屏幕107在用户终端100与用户之间同时提供一个输出及输入界面。具体地,触控屏幕107向用户显示视频输出,这些视频输出的内容可包括文字、图形、视频及其任意组合。
可以理解,图1所示的结构仅为示意,用户终端100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。图1中所示的各组件可以采用硬件、软件或其组合实现。
于本发明实施例中,用户终端100中安装有客户端,该客户端可以是浏览器也可以是第三方应用软件,与服务器(Server)端相对应,为用户提供服务,例如电子书阅读服务,用于播放本地文档或者电子书。
下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参照图2,图2为本发明实施例提供一种分段选择视图呈现方法的用户终端交互界面的示意图,下述的实现过程可参照该附图进行理解。
如图2所示,分段选择视图是用来将不同的分段元素呈现出来,以使用户点击该分段元素即可在内容显示视图中呈现与该分段元素对应的内容。其中,分段选择视图是通过分段选择控件去实现的。
第一实施例
请参照图3,图3为本发明第一实施例提供的一种分段选择视图呈现方法的流程图,所述方法具体包括如下步骤:
步骤S110:响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图。
在本实施例中,所述用户终端100可以为IOS系统,所述用户终端10显示一分段选择视图,所述分段选择视图通过一分段选择视图子类实现,所述分段选择视图子类继承于UIView。所述分段选择视图子类包括预设的多个界面布局函数。
在本实施例中,可以通过界面布局函数获得输入的界面布局参数。所述分段选择视图子类通过代理模式回调所述界面布局函数,并根据获得的界面布局参数控制所述分段选择视图的界面布局。
进一步地,在本实施例中,所述用户终端100可以获取待显示的分段元素的个数,针对每个所述分段元素,获取该分段元素的界面布局参数。
然后,所述分段选择视图子类根据个分段元素的界面布局参数对所述分段选择视图的界面进行布局,并将所述分段元素显示在所述分段选择视图界面上。
例如,可以将分段选择视图配置为滚动视图的方法为:首先通过新建继承自UIView的分段选择视图子类(SegmentControll),并为其添加一个继承自UIScrollView滚动视图(scrollView),负责承载多个分段元素,从而该多个分段元素可在分段选择视图中实现滚动,实现了该分段选择视图为滚动视图。其中,为了提高用户体验,其滚动方式一般为沿分段选择视图横向滚动。
大多情况下,用户是通过手势在用户终端来触发分段元素的,所以需要对分段选择视图(SegmentControll)添加点击手势,并添加手势响应方法(SegmentClicked:),手势可以为多种,例如,手指点击分段元素的手势、上拉或者下拉手势、横向滑动手势等。然后再获取用户在分段选择视图中触发分段元素时的对应手势,通过上述方法可对所述手势做出响应,以触发分段元素触发指令。
在获取触发分段元素触发指令后,还可以获取用户在分段选择视图中通过手势触发的分段元素的索引,其中,已经预先为每个分段元素添加selectIndex属性,该属性则用于指定被用户当前选择的分段元素的索引,为了可以改变分段元素的样式,可以新建继承自UIView的分段元素基类(SegmentItem),并添加BOOL类型属性:selected,表示分段元素是否被用户触发,如分段元素的selected属性置为NO,表示未被触发,分段元素的selected属性置为YES,表示被触发;CGFloat类型的属性:contentAlpha,表示出现的程度(0~1),可以方便制作分段元素在分段选择视图中呈现的过度效果。子类可以重写属性的get和set 方法来定制被触发的分段元素的样式和出现动画,并且基类没有具体的实现,样式完全由子类自身指定,十分灵活。
然后通过上述配置后可以基于所述索引将该索引处的所述分段元素的属性设置为是,以表示所述分段元素被所述用户所触发,当然还需将该分段元素被触发之前的被触发的分段元素的属性值置为否,表示之前的被触发的分段元素当前未被用户所触发,也就是从上一个被触发的分段元素换成了当前被触发的分段元素了,从而用户终端获取所述用户在分段选择视图中触发所述分段元素生成的分段元素触发指令。
然后,用户终端响应于所述分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,该目标分段元素为上述被用户触发的分段元素。
需要说明的是,上述分段元素索引的获取方法可以通过遍历存储有多个分段元素的数组来获取,其数组的创建为在对分段选择视图进行配置中进行的,分段选择视图的具体配置过程为:
首先定义两个协议类:数据源协议(SegmentControllDatasource)和代理协议(SegmentControllDelegate)。其中,数据源协议定义了一系列的数据源协议方法,用来指定分段元素的个数(numberOfItems)、每个分段元素的宽度(widthForItemAtIndex:)、分段元素(itemForIndex:)、分段选择视图样式(SelectType)以及分段指示器的宽度(widthForIndicatorAtIndex:)等。代理协议定义了一系列的代理协议方法,包括点击分段元素的回调(didSelectItemAtIndex:)等。
然后,为分段选择视图添加数据源(datasource)和代理(delegate),分别遵守数据源协议(SegmentControllDatasource)和代理协议(SegmentControllDelegate)。不同的数据源(datasource)和代理(delegate),可以根据需要对协议进行实现,从而可以更加灵活地定制不同的视图选择控制器。
根据上述的数据源(datasource)可以对分段选择视图(SegmentControll)进行配置:首先读取分段元素个数(count),同时创建count容量的数组(items),用来存储多个分段元素,再循环读取index(0<=index<count)位置处的分段元素(item),并根据数据源对widthForItemAtIndex:方法的实现,设置该分段元素的位置和大小,同时添加到分段选择视图(SegmentControll)的滚动视图(scrollView)中,并保存到数组(items)中。
在目标分段元素被触发后,可以通过触发代理(delegate)调用回调方法didSelectItemAtIndex:来在内容显示视图中显示与所述目标分段元素对应的内容,每个分段元素预先设置有对应的显示内容,例如,分段元素“热门游戏”对应的则是相关的游戏内容,如,各个大热的游戏视频直播;分段元素“娱乐”对应的是娱乐相关的内容,如搞笑视频等。
基于上述设计,本实施例提供的分段选择视图呈现方法可以自由灵活地定制不同样式的分段元素,以及分段元素在不同状态下的表现。
步骤S120:基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
根据数据源(datasource)设置的分段选择视图样式(SelectType),包括但不限于居中、居左和居右三种样式,可根据这些分段选择视图样式来滚动所述多个分段元素,以使所述目标分段元素移动到预设位置,可以这样理解,在触发目标分段元素时可将该目标元素的位置自动滚动多个分段元素,将目标分段元素调整到上述三种样式中的一种,或者也可以通过滚动所述多个分段元素,将目标分段元素移动到预设位置。其中,这个预设位置用户可以根据自己的习惯或者用户体验情况来自行设定,例如,如图2,可以将目标分段元素移动到分段选择视图两边或中间,或者分段选择视图中的任意可视位置,从而实现了目标分段元素的位置的动态调整。
本发明第一实施例提供的一种分段选择视图呈现方法,通过响应于用户在分段选择视图中触发的分段元素触发指令,来获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图,然后基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个元素,以使所述目标分段元素移动到预设位置,从而可以实现对于分段元素的位置的动态调整,提高了分段选择视图设计的灵活性。
第二实施例
请参照图4,图4为本发明第二实施例提供的一种分段选择视图呈现方法的流程图,所述方法具体包括如下步骤:
步骤S210:响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图。
该步骤的具体实现方式可以参照第一实施例中的步骤S110中的具体描述,为了描述的简洁,在此不再过多赘述。
步骤S220:基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
该步骤的具体实现方式可以参照第一实施例中的步骤S120中的具体描述,为了描述的简洁,在此不再过多赘述。
步骤S230:将预先创建的分段指示器移动到所述预设位置处,所述分段指示器配置成标识用户所选择的分段元素。
在上述步骤实现将目标分段元素移动到位置后,在对分段元素进行配置时还添加了分 段指示器视图,并开放其属性,则可以对该分段指示器设计不同的样式,例如,可以对该分段指示器的颜色、高度、宽度及是否隐藏等样式进行设计,该分段指示器配置成标识用户所选择的分段元素,例如,上述目标分段元素被用户所触发,即被用户所选择,则该分段指示器处于该目标分段元素的位置处,若将目标分段元素移动到预设位置,则该分段指示器也跟着目标分段元素一起移动到预设位置,以标识该目标分段元素为当前用户所选择的分段元素。
本发明第二实施例提供的一种分段选择视图呈现方法,通过响应于用户在分段选择视图中触发的分段元素触发指令,来获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图,然后基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个元素,以使所述目标分段元素移动到预设位置,并将预先创建的用于标识用户所选择的分段元素的分段指示器移动到到所述预设位置处,从而可以实现对于分段元素的位置的动态调整,提高了分段选择视图设计的灵活性。
第三实施例
请参照图5,图5为本发明第三实施例提供一种分段选择视图呈现装置200的结构框图,所述装置包括:
获取分段元素模块210,配置成响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图。
位置调整模块220,配置成基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
作为一种实施方式,所述装置还包括:
显示模块,配置成在内容显示视图中显示与所述目标分段元素对应的内容。
获取手势模块,配置成获取用户在分段选择视图中触发分段元素时的对应手势。
响应手势模块,配置成对所述手势做出响应,以触发分段元素触发指令。
索引获取模块,配置成获取用户在分段选择视图中触发的分段元素的索引。
触发表示模块,配置成基于所述索引将该索引处的所述分段元素的属性设置为是,以表示所述分段元素被用户所触发,获取用户在分段选择视图中触发所述分段元素生成的分段元素触发指令。
第四实施例
请参照图6,图6为本发明第四实施例提供一种分段选择视图呈现装置300的结构框图,所述装置包括:
获取分段元素模块310,配置成响应于用户在分段选择视图中触发的分段元素触发指 令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图。
位置调整模块320,配置成基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
指示模块330,配置成将预先创建的分段指示器移动到所述预设位置处,所述分段指示器配置成标识用户所选择的分段元素。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法中的对应过程,在此不再过多赘述。
第五实施例
本发明第五实施例提供一种分段选择视图呈现装置,所述装置应用于IOS系统的用户终端,所述用户终端显示一分段选择视图,所述分段选择视图通过一分段选择视图子类实现,所述分段选择视图子类继承于UIView。所述分段选择视图子类包括预设的多个界面布局函数;所述装置包括:
参数获取模块,配置成通过界面布局函数获得输入的界面布局参数;
布局模块,配置成所述分段选择视图子类通过代理模式回调所述界面布局函数,并根据获得的界面布局参数控制所述分段选择视图的界面布局。
可选地,在本实施例中,所述参数获取模块获取待显示的分段元素的个数,针对每个所述分段元素,获取该分段元素的界面布局参数。
所述布局模块根据个分段元素的界面布局参数对所述分段选择视图的界面进行布局,并将所述分段元素显示在所述分段选择视图界面上。
综上所述,本发明实施例提供一种分段选择视图呈现方法、装置及用户终端,通过响应于用户在分段选择视图中触发的分段元素触发指令,来获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图,然后基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个元素,以使所述目标分段元素移动到预设位置,从而实现了目标分段元素的位置的动态调整,提高了分段选择视图设计的灵活性。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不 同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要 素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
工业实用性
本发明实施例提供一种分段选择视图呈现方法、装置及用户终端,通过响应于用户在分段选择视图中触发的分段元素触发指令,来获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图,然后基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个元素,以使所述目标分段元素移动到预设位置,从而可以实现对于分段元素的位置的动态调整,提高了分段选择视图设计的灵活性。
本发明实施例提供一种分段选择视图呈现方法、装置及用户终端,通过代理模式,使用户可以调整所述分段选择视图子类中各界面布局参数,所述分段选择视图子类通过回调这些界面布局参数来统一调整布局。这样便能实现根据需求,实现不同的分段选择控件。

Claims (15)

  1. 一种分段选择视图呈现方法,其特征在于,所述方法包括:
    响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图;
    基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    在内容显示视图中显示与所述目标分段元素对应的内容。
  3. 根据权利要求1所述的方法,其特征在于,所述响应于用户在分段选择视图中触发的分段元素触发指令的步骤之前,还包括:
    获取用户在分段选择视图中触发分段元素时的对应手势;
    对所述手势做出响应,以触发分段元素触发指令。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    将预先创建的分段指示器移动到所述预设位置处,所述分段指示器用于标识用户所选择的分段元素。
  5. 根据权利要求1所述的方法,其特征在于,所述响应于用户在分段选择视图中触发的分段元素触发指令的步骤之前,还包括:
    获取用户在分段选择视图中触发的分段元素的索引;
    基于所述索引将该索引处的所述分段元素的属性设置为是,以表示所述分段元素被用户所触发,获取用户在分段选择视图中触发所述分段元素生成的分段元素触发指令。
  6. 一种分段选择视图呈现方法,其特征在于,所述方法应用于IOS系统的用户终端,所述用户终端显示一分段选择视图,所述分段选择视图通过一分段选择视图子类实现,所述分段选择视图子类继承于UIView;所述分段选择视图子类包括预设的多个界面布局函数;所述方法包括:
    通过界面布局函数获得输入的界面布局参数;
    所述分段选择视图子类通过代理模式回调所述界面布局函数,并根据获得的界面布局参数控制所述分段选择视图的界面布局。
  7. 根据权利要求6所述的方法,其特征在于,所述通过界面布局函数获得输入的界面布局参数的步骤包括:
    获取待显示的分段元素的个数,针对每个所述分段元素,获取该分段元素的界面布局参数;
    所述据获得的界面布局参数控制所述分段选择视图的界面布局的步骤包括:
    所述分段选择视图子类根据个分段元素的界面布局参数对所述分段选择视图的界面进行布局,并将所述分段元素显示在所述分段选择视图界面上。
  8. 一种分段选择视图呈现装置,其特征在于,所述装置包括:
    获取分段元素模块,配置成响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图;
    位置调整模块,配置成基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    显示模块,配置成在内容显示视图中显示与所述目标分段元素对应的内容。
  10. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    获取手势模块,配置成获取用户在分段选择视图中触发分段元素时的对应手势;
    响应手势模块,用于对所述手势做出响应,以触发分段元素触发指令。
  11. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    指示模块,配置成将预先创建的分段指示器移动到到所述预设位置处,所述分段指示器配置成标识用户所选择的分段元素。
  12. 一种分段选择视图呈现装置,其特征在于,所述装置应用于IOS系统的用户终端,所述用户终端显示一分段选择视图,所述分段选择视图通过一分段选择视图子类实现,所述分段选择视图子类继承于UIView;所述分段选择视图子类包括预设的多个界面布局函数;所述装置包括:
    参数获取模块,配置成通过界面布局函数获得输入的界面布局参数;
    布局模块,配置成所述分段选择视图子类通过代理模式回调所述界面布局函数,并根据获得的界面布局参数控制所述分段选择视图的界面布局。
  13. 根据权利要求12所述的方法,其特征在于,
    所述参数获取模块获取待显示的分段元素的个数,针对每个所述分段元素,获取该分段元素的界面布局参数;
    所述布局模块根据个分段元素的界面布局参数对所述分段选择视图的界面进行布局,并将所述分段元素显示在所述分段选择视图界面上。
  14. 一种用户终端,其特征在于,所述用户终端包括处理器以及存储器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述用户终端执行以下操作:
    响应于用户在分段选择视图中触发的分段元素触发指令,获取用户在所述分段选择视图中的多个分段元素中选择的目标分段元素,其中,所述分段选择视图为滚动视图;
    基于预设的分段选择视图样式在所述分段选择视图中滚动所述多个分段元素,以使所述目标分段元素移动到预设位置。
  15. 一种计算机可读存储介质,其特征在于,存储有一个或多个可执行的指令,所述指令在被至少一个处理器执行时,实现权利要求1-7中任意一项所述的分段选择视图呈现方法。
PCT/CN2017/109569 2017-06-05 2017-11-06 分段选择视图呈现方法、装置及用户终端 WO2018223593A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710416017.9 2017-06-05
CN201710416017.9A CN107239212B (zh) 2017-06-05 2017-06-05 分段选择视图呈现方法、装置及用户终端

Publications (1)

Publication Number Publication Date
WO2018223593A1 true WO2018223593A1 (zh) 2018-12-13

Family

ID=59985397

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/109569 WO2018223593A1 (zh) 2017-06-05 2017-11-06 分段选择视图呈现方法、装置及用户终端

Country Status (2)

Country Link
CN (1) CN107239212B (zh)
WO (1) WO2018223593A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239212B (zh) * 2017-06-05 2020-02-07 武汉斗鱼网络科技有限公司 分段选择视图呈现方法、装置及用户终端
CN108108221B (zh) * 2018-01-02 2021-09-07 武汉斗鱼网络科技有限公司 一种指定操作切换实时数据显示的方法及装置
CN109992188B (zh) * 2018-01-02 2021-02-02 武汉斗鱼网络科技有限公司 一种iOS移动端文本滚动显示的实现方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298454A (zh) * 2013-07-15 2015-01-21 霍尼韦尔国际公司 用于智能家居系统的用户界面导航系统和方法
CN105718148A (zh) * 2016-01-26 2016-06-29 北京小米移动软件有限公司 应用图标的显示方法、装置和设备
CN107239212A (zh) * 2017-06-05 2017-10-10 武汉斗鱼网络科技有限公司 分段选择视图呈现方法、装置及用户终端

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4730571B2 (ja) * 2000-05-01 2011-07-20 ソニー株式会社 情報処理装置および方法、並びにプログラム格納媒体
CN1808364A (zh) * 2005-12-20 2006-07-26 无锡永中科技有限公司 在计算机上显示电子幻灯导航信息的方法
JP5754119B2 (ja) * 2010-12-07 2015-07-29 ソニー株式会社 情報処理装置、情報処理方法及びプログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298454A (zh) * 2013-07-15 2015-01-21 霍尼韦尔国际公司 用于智能家居系统的用户界面导航系统和方法
CN105718148A (zh) * 2016-01-26 2016-06-29 北京小米移动软件有限公司 应用图标的显示方法、装置和设备
CN107239212A (zh) * 2017-06-05 2017-10-10 武汉斗鱼网络科技有限公司 分段选择视图呈现方法、装置及用户终端

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WANG, YUEMEI: "Design and Implementation of the Train Travel System APP based on IOS", ELECTRONIC TECHNOLOGY & SOFTWARE ENGINEERING, 29 March 2017 (2017-03-29), pages 50 - 52, ISSN: 2095-5650 *

Also Published As

Publication number Publication date
CN107239212A (zh) 2017-10-10
CN107239212B (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
US11782581B2 (en) Display control method and device, electronic device and storage medium
WO2020147665A1 (zh) 文件处理方法、装置、终端及存储介质
US9733815B2 (en) Split-screen display method and apparatus, and electronic device thereof
JP2021507364A (ja) ユーザーインタフェースの表示方法、装置、デバイス及び記憶媒体
CN107391117B (zh) 轻应用的分屏处理方法、设备及电子设备
US20160162164A1 (en) Integrated icon resizing control
WO2021072926A1 (zh) 文件共享方法、装置、系统、交互智能设备、源端设备及存储介质
CN109508128B (zh) 搜索控件显示方法、装置、设备及计算机可读存储介质
CN107357483B (zh) 数据分享方法及装置、计算机设备和计算机可读存储介质
CN104331246A (zh) 在终端中进行分屏显示的设备和方法
TW201923547A (zh) 處理方法、裝置、設備和機器可讀媒體
CN110825997B (zh) 信息流页面的显示方法、装置、终端设备及系统
WO2019015582A1 (zh) 信息提示方法及移动终端
KR20170026272A (ko) 콘텐츠 편집 장치 및 편집 방법
US20180335906A1 (en) Application icon previewing method and device, and electronic device
CN110928614B (zh) 界面显示方法、装置、设备及存储介质
WO2018223593A1 (zh) 分段选择视图呈现方法、装置及用户终端
WO2021254201A1 (zh) 页面显示方法、装置、存储介质及电子设备
WO2017215542A1 (zh) 展示图片的方法及装置
WO2015184736A1 (zh) 一种触屏设备背景图变换的方法及终端
CN110909274B (zh) 页面浏览方法、装置及电子设备
CA3070615A1 (en) Page browsing method and device, and electronic apparatus
JP2020053049A (ja) アプリケーションビルダ
US20230342018A1 (en) Dynamic element control method, electronic device, and computer readable storage medium
CN107562324B (zh) 数据显示控制的方法和终端

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17912782

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17912782

Country of ref document: EP

Kind code of ref document: A1