WO2018064880A1 - 一种ios系统中列表视图构建方法及系统 - Google Patents
一种ios系统中列表视图构建方法及系统 Download PDFInfo
- Publication number
- WO2018064880A1 WO2018064880A1 PCT/CN2017/080787 CN2017080787W WO2018064880A1 WO 2018064880 A1 WO2018064880 A1 WO 2018064880A1 CN 2017080787 W CN2017080787 W CN 2017080787W WO 2018064880 A1 WO2018064880 A1 WO 2018064880A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- cell
- section
- class
- protocol
- view
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
Definitions
- the present invention relates to the field of list extension technology in an IOS system, and in particular to a method and system for constructing a list view in an IOS system.
- the list in the IOS system is implemented by the native control UITableView or UICollectionView provided by the IOS system. After providing the datasource information and the delegate information for the UITableView or UICollectionView, the corresponding list effect can be realized.
- the cell for displaying the content of the list is provided by the datasource and the corresponding logic of the corresponding cell is processed in the corresponding delegate, in the IOS system, it is necessary to make a lot of judgments in the callback datasource information and the delegate information to be different. Styles to provide different cells and handle the corresponding logic. If there are many types of cells in the list, a lot of judgments need to be processed. Moreover, if the subsequent expansion of the cell style is required, maintenance and modification of these large amounts of judgments are required, and the maintenance cost is very high.
- the present invention aims to provide a method and system for constructing a list view in an IOS system, which simplifies the step of judging the construction of the list view, and greatly improves the maintainability and availability of the list view. Scalability.
- the technical solution adopted by the present invention is: a method for constructing a list view in an IOS system, comprising the following steps:
- the cell protocol includes a method for obtaining the number of cells, a method for acquiring a cell, a method for adding a cell, a method for removing a cell, and a method for clearing a cell; the cell protocol includes a reusable identifier of the cell, a layout configuration method of the cell, and a cell. Assembly method, type of cell;
- the client creates a corresponding section class according to each section style required to construct the list view and adds a section protocol in the section class to obtain a collection of section sections that implement the section protocol; each cell required according to the build list view The style creates a corresponding cell class and adds a cell protocol in the section class to obtain a collection of cell classes that implement the cell protocol;
- the client obtains the source data of the build list view from the server, determines the section style and the cell style to be used in constructing the list view, and obtains the section corresponding to the section style and the cell style from the set of the section class and the set of the cell class in step S2.
- the class and the cell class encapsulate the section data in the source data according to the section protocol in the section class to obtain an instance of the section class, and perform encapsulation processing on the cell data in the source data according to the cell protocol in the cell class to obtain an instance of the cell class;
- step S5 further includes acquiring click event information of the section view and/or the cell view by using each callback method in the delegate mechanism, and The click event information of the section view and/or the cell view is obtained according to the section instance and the method of the cell class in the instance of the cell class, and the click event information of the section view and/or the cell view is obtained in the list.
- the section protocol further includes a size, a category, a reuse identifier of the head view and/or the foot view, and an assembly method of the head view and/or the foot view.
- the cell protocol further includes a processing method of a click event of the cell.
- the order of the section class and the instance of the cell class in the instance of the cell class or the cell data can be adjusted; if a cell view needs to be discarded, the instance of the section class and The specified cell data can be deleted from the instance of the cell class.
- an instance of a new section class or an instance of a cell class is constructed according to a section protocol and a cell protocol.
- step S4 includes:
- S402 Perform a dataSouce callback method, and obtain a number of cells in each section of the to-be-assembled list; the number of cells in each section is obtained by acquiring a number of cells in a section protocol;
- S403 Perform a dataSouce callback method, and obtain information about each cell of the to-be-assembled list; the information of each cell includes a method for acquiring a cell and an assembly method; and the method for acquiring the cell is obtained by using a re-use identifier of the cell set in the cell protocol; The assembly method of the cell is obtained by the assembly method of the cell set in the cell protocol.
- the invention also discloses a list construction system in an IOS system, comprising:
- the protocol creation module is configured to create a section protocol and a cell protocol;
- the section protocol includes a method for obtaining a number of cells, a method for acquiring a cell, a method for adding a cell, a method for removing a cell, and a method for clearing a cell; and
- the cell protocol includes a reusing identifier of the cell. Character, cell layout configuration method, cell assembly method, cell type;
- a class creation module for creating a corresponding section class according to each section style required to construct the list view and adding a section protocol in the section class to obtain a collection of section sections implementing the section protocol; each required according to the build list view
- the cell style creates a corresponding cell class and adds a cell protocol in the section class to obtain a collection of cell classes that implement the cell protocol.
- the source data processing module is configured to obtain the source data of the build list view from the server, determine the section style and the cell style to be used in constructing the list view, and obtain the section style and the cell style from the set of the section class and the set of the cell class in step S2.
- the section data in the source data is encapsulated to obtain an instance of the section class
- the cell data in the source data is encapsulated according to the cell protocol in the cell class to obtain the cell class.
- the dataSouce callback processing module is configured to obtain the information required for constructing the list view by using various callback methods in the dataSource mechanism, and obtain the required information for constructing the list view according to the instance of the section class and the method in the instance of the cell class and the method in the cell protocol. Information, complete the list view construction;
- the delegate callback processing module obtains the layout configuration information of the list view by using each callback method in the delegate mechanism, and obtains the layout configuration information of the list view according to the instance of the section class and the instance of the cell class and the method in the cell protocol, and sets the list. Get the click event information of the section view and/or the cell view in the layout configuration or setting list of the section view and/or the cell view.
- the section protocol further includes a header view and/or The size, category, reuse identifier of the foot view, and the assembly method for the head and/or foot views.
- the cell protocol further includes a processing method of a click event of the cell.
- the present invention abstracts a set of section protocol and cell protocol.
- a section protocol and a cell protocol are added in the section class and the cell class; and an instance of the section class and a cell class are created according to the obtained source data.
- Example. When using the dataSource mechanism and each callback method in the delegate mechanism to obtain the information needed to construct the list view, according to the instance of the section class and the method in the instance of the cell class and the method in the cell protocol, the required configuration of the list view can be obtained. The information, thus completing the construction of the list view, simplifies the decision step in building the list view.
- FIG. 1 is a schematic flowchart of a method for constructing a list view in an IOS system according to an embodiment of the present invention
- step S4 of a method for constructing a list view in an IOS system according to an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a list construction system in an IOS system according to an embodiment of the present invention.
- an embodiment of the present invention provides a method for constructing a list view in an IOS system, including the following steps:
- a method for constructing a list view in an IOS system includes the following steps:
- the client obtains a preset section (content display module) protocol and a cell (content display unit) protocol;
- the section protocol includes a method for acquiring the number of cells, a method for acquiring a cell, a method for adding a cell, a method for removing a cell, and an emptying Cell method;
- the cell protocol includes a cell reuse identifier, a cell layout configuration method, a cell assembly method, and a cell type;
- the client creates a corresponding section class according to each section style required to construct the list view and adds a section protocol in the section class to obtain a collection of section sections that implement the section protocol; each cell required according to the build list view The style creates a corresponding cell class and adds a cell protocol in the section class to obtain a collection of cell classes that implement the cell protocol;
- the client obtains the source data of the build list view from the server, determines the section style and the cell style to be used in constructing the list view, and obtains the section corresponding to the section style and the cell style from the set of the section class and the set of the cell class in step S2.
- the class and the cell class encapsulate the section data in the source data according to the section protocol in the section class to obtain an instance of the section class, and perform encapsulation processing on the cell data in the source data according to the cell protocol in the cell class to obtain an instance of the cell class;
- step S4 includes:
- S402 Perform a dataSouce callback method, and obtain a number of cells in each section of the to-be-assembled list; the number of cells in each section is obtained by acquiring a number of cells in a section protocol;
- S403 Perform a dataSouce callback method, and obtain information about each cell of the to-be-assembled list; the information of each cell includes a method for acquiring a cell and an assembly method; and the method for acquiring the cell is obtained by using a re-use identifier of the cell set in the cell protocol; The assembly method of the cell is obtained by the assembly method of the cell set in the cell protocol.
- Step S5 further includes obtaining click event information of the section view and/or the cell view by using each callback method in the delegate mechanism, and obtaining the section view and/or according to the section protocol instance and the method in the cell protocol and the method in the cell protocol. Click event information of the cell view, and set the click event information of the section view and/or the cell view in the setting list.
- the section protocol also includes the size, category, reuse identifier of the header view and/or foot view, and the assembly method of the header view and/or the foot view.
- the cell protocol also includes a method of processing a click event of a cell.
- the cell data can be.
- the present invention discloses a list construction system in an IOS system, including:
- the protocol creation module is configured to create a section protocol and a cell protocol;
- the section protocol includes a method for obtaining a number of cells, a method for acquiring a cell, a method for adding a cell, a method for removing a cell, and a method for clearing a cell; and
- the cell protocol includes a reusing identifier of the cell. Character, cell layout configuration method, cell assembly method, cell type;
- a class creation module for creating a corresponding section class according to each section style required to construct the list view and adding a section protocol in the section class to obtain a collection of section sections implementing the section protocol; each required according to the build list view
- the cell style creates a corresponding cell class and adds a cell protocol in the section class to obtain a collection of cell classes that implement the cell protocol.
- the source data processing module is configured to obtain the source data of the build list view from the server, determine the section style and the cell style to be used in constructing the list view, and obtain the section style and the cell style from the set of the section class and the set of the cell class in step S2.
- the section data in the source data is encapsulated to obtain an instance of the section class
- the cell data in the source data is encapsulated according to the cell protocol in the cell class to obtain the cell class.
- the dataSouce callback processing module is configured to obtain the information required for constructing the list view by using various callback methods in the dataSource mechanism, and obtain the required information for constructing the list view according to the instance of the section class and the method in the instance of the cell class and the method in the cell protocol. Information, complete the list view construction;
- the delegate callback processing module obtains the layout configuration information of the list view by using each callback method in the delegate mechanism, and obtains the layout configuration information of the list view according to the instance of the section class and the instance of the cell class and the method in the cell protocol, and sets the list. Get in the layout configuration or settings list of the section view and/or cell view Click event information for the section view and/or cell view.
- the section protocol also includes the size, category, reuse identifier of the header view and/or foot view, and the assembly method of the header view and/or the foot view.
- the cell protocol also includes a method of processing a click event of a cell.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
一种IOS系统中列表视图构建方法和系统,涉及IOS系统中的列表扩展技术领域,包括S1,客户端获取预设的section协议和cell协议;S2,客户端根据构建列表视图所需的section样式和cell样式创建实现section协议的section类和实现cell协议的cell类;S3,客户端从服务器获取构建列表视图的源数据,创建section类的实例和cell类的实例;S4,使用dataSource机制中的各个回调方法获取列表视图构建信息,完成列表视图构建;S5,使用delegate机制中的各个回调方法获取列表视图的布局配置信息,设置列表中section视图和cell视图的布局配置信息。
Description
本发明涉及IOS系统中的列表扩展技术领域,具体涉及一种IOS系统中列表视图构建方法及系统。
IOS系统中的列表都是通过IOS系统提供的原生控件UITableView或UICollectionView来实现的,在为UITableView或UICollectionView提供datasource信息和delegate信息之后就可以实现相应的列表效果。
由于用于显示列表内容的cell是由datasource来提供,并在相应的delegate中处理对应的cell的相应的逻辑,在IOS系统中,需要在回调datasource信息和delegate信息中做很多判断才能为不同的样式来提供不同的cell并处理相应的逻辑。如果列表中cell的种类有很多,则需要处理大量的判断。并且,如果后续需要对cell的样式做扩展的话则需要对这些大量的判断做维护和修改,维护成本非常高。
发明内容
针对现有技术中存在的缺陷,本发明的目的在于提供一种IOS系统中列表视图构建方法及系统,简化构建列表视图的中的判断步骤,极大的提高了列表视图的可维护性和可扩展性。
为达到以上目的,本发明采取的技术方案是:一种IOS系统中列表视图构建方法,包括以下步骤:
S1,客户端获取预设的内容显示模块section协议和内容显示单
元cell协议;section协议包括获取cell数量的方法、获取cell的方法、添加cell的方法、移除cell的方法、清空cell的方法;cell协议包括cell的重用标识符、cell的布局配置方法、cell的装配方法、cell的种类;
S2,客户端根据构建列表视图所需的每个section样式创建对应的section类并在section类中添加section协议,得到实现section协议的section类的集合;根据构建列表视图所需的的每个cell样式创建对应的cell类并在section类中添加cell协议,得到实现cell协议的cell类的集合;
S3,客户端从服务器获取构建列表视图的源数据,判断构建列表视图需采用的section样式和cell样式,从步骤S2中section类的集合和cell类的集合中获取section样式和cell样式对应的section类和cell类,根据section类中的section协议对源数据中的section数据进行封装处理得到section类的实例,根据cell类中cell协议对源数据中的cell数据进行封装处理得到cell类的实例;
S4,使用数据源dataSource机制中的各个回调方法获取构建列表视图所需的信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取构建列表视图所需的信息,完成列表视图构建;
S5,使用委托代理delegate机制中的各个回调方法获取列表视图的布局配置信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取列表视图的布局配置信息,设置列表中section视图和/或cell视图的布局配置。
在上述技术方案的基础上,步骤S5还包括使用delegate机制中的各个回调方法获取section视图和/或cell视图的点击事件信息,根
据section类的实例和cell类的实例中section协议和cell协议中的方法获取section视图和/或cell视图的点击事件信息,设置列表中获取section视图和/或cell视图的点击事件信息。
在上述技术方案的基础上,所述section协议还包括头视图和/或脚视图的尺寸、类别、重用标识符,以及头视图和/或脚视图的装配方法。
在上述技术方案的基础上,所述cell协议还包括cell的点击事件的处理方法。
在上述技术方案的基础上,若需调整列表视图布局,调整section类的实例和cell类的实例中section数据或cell数据的顺序即可;若需废弃某一cell视图,在section类的实例和cell类的实例中删除指定的cell数据即可。
在上述技术方案的基础上,若需新增cell视图,按照section协议和cell协议构造新的section类的实例或cell类的实例。
在上述技术方案的基础上,步骤S4的具体过程包括:
S401,执行dataSouce回调方法,直接获取待装配列表的section数量;
S402,执行dataSouce回调方法,获取待装配列表的每个section中cell数量;所述每个section中cell数量通过section协议中获取cell数量的方法获取;
S403,执行dataSouce回调方法,获取待装配列表的每个cell的信息;每个cell的信息包括cell的获取方法和装配方法;cell的获取方法通过cell协议中设定的cell的重用标识符获取;cell的装配方法通过cell协议中设定的cell的装配方法获取。
本发明还公开了一种IOS系统中列表构建系统,包括:
协议创建模块,用于创建section协议和cell协议;section协议包括获取cell数量的方法、获取cell的方法、添加cell的方法、移除cell的方法、清空cell的方法;cell协议包括cell的重用标识符、cell的布局配置方法、cell的装配方法、cell的种类;
类创建模块,用于根据构建列表视图所需的每个section样式创建对应的section类并在section类中添加section协议,得到实现section协议的section类的集合;根据构建列表视图所需的每个cell样式创建对应的cell类并在section类中添加cell协议,得到实现cell协议的cell类的集合;
源数据处理模块,用于从服务器获取构建列表视图的源数据,判断构建列表视图需采用的section样式和cell样式,从步骤S2中section类的集合和cell类的集合中获取section样式和cell样式对应的section类和cell类,根据section类中的section协议对源数据中的section数据进行封装处理得到section类的实例,根据cell类中cell协议对源数据中的cell数据进行封装处理得到cell类的实例;
dataSouce回调处理模块,用于使用dataSource机制中的各个回调方法获取构建列表视图所需的信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取构建列表视图所需的信息,完成列表视图构建;
delegate回调处理模块,使用delegate机制中的各个回调方法获取列表视图的布局配置信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取列表视图的布局配置信息,设置列表中section视图和/或cell视图的布局配置或设置列表中获取section视图和/或cell视图的点击事件信息。
在上述技术方案的基础上,所述section协议还包括头视图和/或
脚视图的尺寸、类别、重用标识符,以及头视图和/或脚视图的装配方法。
在上述技术方案的基础上,所述cell协议还包括cell的点击事件的处理方法。
与现有技术相比,本发明的优点在于:
1、本发明抽象出一组section协议和cell协议,创建section类和cell类时,在section类和cell类中添加section协议和cell协议;根据获取的源数据创建section类的实例和cell类的实例。在使用dataSource机制和delegate机制中的各个回调方法获取构建列表视图所需的信息时,根据section类的实例和cell类的实例中section协议和cell协议中的方法即可获取构建列表视图所需的信息,从而完成列表视图的构建,简化了构建列表视图的中的判断步骤。
2、若需调整列表视图布局,调整section类的实例和cell类的实例中section数据或cell数据的顺序即可;若需废弃某一cell视图,在section类的实例和cell类的实例中删除指定的cell数据即可。若需新增cell视图,按照section协议和cell协议构造新的section类的实例或cell类的实例。
图1为本发明实施例中IOS系统中列表视图构建方法的流程示意图;
图2为本发明实施例中IOS系统中列表视图构建方法步骤S4的流程示意图;
图3为本发明实施例中IOS系统中列表构建系统的结构示意图。
以下结合附图及实施例对本发明作进一步详细说明。
参见图1所示,本发明实施例提供一种IOS系统中列表视图构建方法,包括以下步骤:一种IOS系统中列表视图构建方法包括以下步骤:
S1,客户端获取预设的section(内容显示模块)协议和cell(内容显示单元)协议;section协议包括获取cell数量的方法、获取cell的方法、添加cell的方法、移除cell的方法、清空cell的方法;cell协议包括cell的重用标识符、cell的布局配置方法、cell的装配方法、cell的种类;
S2,客户端根据构建列表视图所需的每个section样式创建对应的section类并在section类中添加section协议,得到实现section协议的section类的集合;根据构建列表视图所需的的每个cell样式创建对应的cell类并在section类中添加cell协议,得到实现cell协议的cell类的集合;
S3,客户端从服务器获取构建列表视图的源数据,判断构建列表视图需采用的section样式和cell样式,从步骤S2中section类的集合和cell类的集合中获取section样式和cell样式对应的section类和cell类,根据section类中的section协议对源数据中的section数据进行封装处理得到section类的实例,根据cell类中cell协议对源数据中的cell数据进行封装处理得到cell类的实例;
S4,使用dataSource(数据源)机制中的各个回调方法获取构建列表视图所需的信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取构建列表视图所需的信息,完成列表视图构建;
参见图2所示,步骤S4的具体过程包括:
S401,执行dataSouce回调方法,直接获取待装配列表的section数量;
S402,执行dataSouce回调方法,获取待装配列表的每个section中cell数量;每个section中cell数量通过section协议中获取cell数量的方法获取;
S403,执行dataSouce回调方法,获取待装配列表的每个cell的信息;每个cell的信息包括cell的获取方法和装配方法;cell的获取方法通过cell协议中设定的cell的重用标识符获取;cell的装配方法通过cell协议中设定的cell的装配方法获取。
S5,使用delegate(委托代理)机制中的各个回调方法获取列表视图的布局配置信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取列表视图的布局配置信息,设置列表中section视图和/或cell视图的布局配置。
步骤S5还包括使用delegate机制中的各个回调方法获取section视图和/或cell视图的点击事件信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取section视图和/或cell视图的点击事件信息,设置列表中获取section视图和/或cell视图的点击事件信息。section协议还包括头视图和/或脚视图的尺寸、类别、重用标识符,以及头视图和/或脚视图的装配方法。cell协议还包括cell的点击事件的处理方法。
若需调整列表视图布局,调整section类的实例和cell类的实例中section数据或cell数据的顺序即可;若需废弃某一cell视图,在section类的实例和cell类的实例中删除指定的cell数据即可。
若需新增cell视图,按照section协议和cell协议构造新的section类的实例或cell类的实例。
参见图3所示,本发明该公开了一种IOS系统中列表构建系统,包括:
协议创建模块,用于创建section协议和cell协议;section协议包括获取cell数量的方法、获取cell的方法、添加cell的方法、移除cell的方法、清空cell的方法;cell协议包括cell的重用标识符、cell的布局配置方法、cell的装配方法、cell的种类;
类创建模块,用于根据构建列表视图所需的每个section样式创建对应的section类并在section类中添加section协议,得到实现section协议的section类的集合;根据构建列表视图所需的每个cell样式创建对应的cell类并在section类中添加cell协议,得到实现cell协议的cell类的集合;
源数据处理模块,用于从服务器获取构建列表视图的源数据,判断构建列表视图需采用的section样式和cell样式,从步骤S2中section类的集合和cell类的集合中获取section样式和cell样式对应的section类和cell类,根据section类中的section协议对源数据中的section数据进行封装处理得到section类的实例,根据cell类中cell协议对源数据中的cell数据进行封装处理得到cell类的实例;
dataSouce回调处理模块,用于使用dataSource机制中的各个回调方法获取构建列表视图所需的信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取构建列表视图所需的信息,完成列表视图构建;
delegate回调处理模块,使用delegate机制中的各个回调方法获取列表视图的布局配置信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取列表视图的布局配置信息,设置列表中section视图和/或cell视图的布局配置或设置列表中获取
section视图和/或cell视图的点击事件信息。
section协议还包括头视图和/或脚视图的尺寸、类别、重用标识符,以及头视图和/或脚视图的装配方法。cell协议还包括cell的点击事件的处理方法。
本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。
Claims (10)
- 一种IOS系统中列表视图构建方法,其特征在于,包括以下步骤:S1,客户端获取预设的内容显示模块section协议和内容显示单元cell协议;section协议包括获取cell数量的方法、获取cell的方法、添加cell的方法、移除cell的方法、清空cell的方法;cell协议包括cell的重用标识符、cell的布局配置方法、cell的装配方法、cell的种类;S2,客户端根据构建列表视图所需的每个section样式创建对应的section类并在section类中添加section协议,得到实现section协议的section类的集合;根据构建列表视图所需的的每个cell样式创建对应的cell类并在section类中添加cell协议,得到实现cell协议的cell类的集合;S3,客户端从服务器获取构建列表视图的源数据,判断构建列表视图需采用的section样式和cell样式,从步骤S2中section类的集合和cell类的集合中获取section样式和cell样式对应的section类和cell类,根据section类中的section协议对源数据中的section数据进行封装处理得到section类的实例,根据cell类中cell协议对源数据中的cell数据进行封装处理得到cell类的实例;S4,使用数据源dataSource机制中的各个回调方法获取构建列表视图所需的信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取构建列表视图所需的信息,完成列表视图构建;S5,使用委托代理delegate机制中的各个回调方法获取列表视图的布局配置信息,根据section类的实例和cell类的实例中section协 议和cell协议中的方法获取列表视图的布局配置信息,设置列表中section视图和/或cell视图的布局配置。
- 如权利要求1所述的一种IOS系统中列表视图构建方法,其特征在于:步骤S5还包括使用delegate机制中的各个回调方法获取section视图和/或cell视图的点击事件信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取section视图和/或cell视图的点击事件信息,设置列表中获取section视图和/或cell视图的点击事件信息。
- 如权利要求1所述的一种IOS系统中列表视图构建方法,其特征在于:所述section协议还包括头视图和/或脚视图的尺寸、类别、重用标识符,以及头视图和/或脚视图的装配方法。
- 如权利要求1所述的一种IOS系统中列表视图构建方法,其特征在于:所述cell协议还包括cell的点击事件的处理方法。
- 如权利要求1所述的一种IOS系统中列表视图构建方法,其特征在于:若需调整列表视图布局,调整section类的实例和cell类的实例中section数据或cell数据的顺序即可;若需废弃某一cell视图,在section类的实例和cell类的实例中删除指定的cell数据即可。
- 如权利要求1所述的一种IOS系统中列表视图构建方法,其特征在于:若需新增cell视图,按照section协议和cell协议构造新的section类的实例或cell类的实例。
- 如权利要求1所述的一种IOS系统中列表视图构建方法,其特征在于:步骤S4的具体过程包括:S401,执行dataSouce回调方法,直接获取待装配列表的section数量;S402,执行dataSouce回调方法,获取待装配列表的每个section 中cell数量;所述每个section中cell数量通过section协议中获取cell数量的方法获取;S403,执行dataSouce回调方法,获取待装配列表的每个cell的信息;每个cell的信息包括cell的获取方法和装配方法;cell的获取方法通过cell协议中设定的cell的重用标识符获取;cell的装配方法通过cell协议中设定的cell的装配方法获取。
- 一种IOS系统中列表构建系统,其特征在于,包括:协议创建模块,用于创建section协议和cell协议;section协议包括获取cell数量的方法、获取cell的方法、添加cell的方法、移除cell的方法、清空cell的方法;cell协议包括cell的重用标识符、cell的布局配置方法、cell的装配方法、cell的种类;类创建模块,用于根据构建列表视图所需的每个section样式创建对应的section类并在section类中添加section协议,得到实现section协议的section类的集合;根据构建列表视图所需的每个cell样式创建对应的cell类并在section类中添加cell协议,得到实现cell协议的cell类的集合;源数据处理模块,用于从服务器获取构建列表视图的源数据,判断构建列表视图需采用的section样式和cell样式,从步骤S2中section类的集合和cell类的集合中获取section样式和cell样式对应的section类和cell类,根据section类中的section协议对源数据中的section数据进行封装处理得到section类的实例,根据cell类中cell协议对源数据中的cell数据进行封装处理得到cell类的实例;dataSouce回调处理模块,用于使用dataSource机制中的各个回调方法获取构建列表视图所需的信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取构建列表视图所需 的信息,完成列表视图构建;delegate回调处理模块,使用delegate机制中的各个回调方法获取列表视图的布局配置信息,根据section类的实例和cell类的实例中section协议和cell协议中的方法获取列表视图的布局配置信息,设置列表中section视图和/或cell视图的布局配置或设置列表中获取section视图和/或cell视图的点击事件信息。
- 如权利要求8所述的一种IOS系统中列表视图构建系统,其特征在于:所述section协议还包括头视图和/或脚视图的尺寸、类别、重用标识符,以及头视图和/或脚视图的装配方法。
- 如权利要求8所述的一种IOS系统中列表视图构建系统,其特征在于:所述cell协议还包括cell的点击事件的处理方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610880969.1A CN106502656B (zh) | 2016-10-09 | 2016-10-09 | 一种ios系统中列表视图构建方法及系统 |
| CN201610880969.1 | 2016-10-09 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018064880A1 true WO2018064880A1 (zh) | 2018-04-12 |
Family
ID=58294633
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/080787 Ceased WO2018064880A1 (zh) | 2016-10-09 | 2017-04-17 | 一种ios系统中列表视图构建方法及系统 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106502656B (zh) |
| WO (1) | WO2018064880A1 (zh) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114327728A (zh) * | 2021-12-29 | 2022-04-12 | 浪潮卓数大数据产业发展有限公司 | 一种应用单元格构建方法、设备及介质 |
| CN114489643A (zh) * | 2022-01-10 | 2022-05-13 | 宝宝巴士股份有限公司 | 一种iOS应用内启动多弹框的方法 |
| CN114625460A (zh) * | 2022-02-24 | 2022-06-14 | 北京百度网讯科技有限公司 | 图文混排方法、装置、设备以及存储介质 |
| CN115237413A (zh) * | 2022-09-22 | 2022-10-25 | 北京达佳互联信息技术有限公司 | 一种列表处理方法、装置、电子设备及存储介质 |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106502656B (zh) * | 2016-10-09 | 2018-08-03 | 武汉斗鱼网络科技有限公司 | 一种ios系统中列表视图构建方法及系统 |
| CN109144624B (zh) * | 2017-06-28 | 2021-10-15 | 武汉斗鱼网络科技有限公司 | Ios中展示不等高列表的方法、存储介质、设备及系统 |
| CN107656729B (zh) * | 2017-08-31 | 2020-04-28 | 深圳壹账通智能科技有限公司 | 列表视图的更新装置、方法及计算机可读存储介质 |
| CN108509188B (zh) * | 2018-03-30 | 2021-11-09 | 武汉斗鱼网络科技有限公司 | 一种列表的建立方法、装置及电子设备 |
| CN111046206A (zh) * | 2018-10-12 | 2020-04-21 | 武汉斗鱼网络科技有限公司 | 头像列表展示方法、装置、电子设备及存储介质 |
| CN109582193B (zh) * | 2018-11-30 | 2021-01-29 | 北京微播视界科技有限公司 | 列表管理组中的项cell的控制显示方法及电子设备 |
| CN109656659B (zh) * | 2018-12-11 | 2020-02-07 | 北京微播视界科技有限公司 | 行为事件的处理方法、装置、电子设备及可读存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103064662A (zh) * | 2012-08-28 | 2013-04-24 | 华南理工大学 | 基于Android平台的PhoneGap跨平台媒体扩展框架 |
| US20150040099A1 (en) * | 2013-07-31 | 2015-02-05 | Sap Ag | Extensible applications using a mobile application framework |
| CN105354013A (zh) * | 2014-08-18 | 2016-02-24 | 阿里巴巴集团控股有限公司 | 应用界面渲染方法及装置 |
| CN106502656A (zh) * | 2016-10-09 | 2017-03-15 | 武汉斗鱼网络科技有限公司 | 一种ios系统中列表视图构建方法及系统 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150261426A1 (en) * | 2014-03-13 | 2015-09-17 | Ustringer LLC | Method and apparatus for communication using images, sketching, and stamping |
| CN104636136B (zh) * | 2015-01-12 | 2018-06-08 | 沈文策 | 基于iOS系统中UITableView类型Plain模拟Group的方法 |
| CN105786567B (zh) * | 2016-02-25 | 2019-01-11 | 四川长虹电器股份有限公司 | iOS应用子模块动态升级方法及其中间系统 |
-
2016
- 2016-10-09 CN CN201610880969.1A patent/CN106502656B/zh active Active
-
2017
- 2017-04-17 WO PCT/CN2017/080787 patent/WO2018064880A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103064662A (zh) * | 2012-08-28 | 2013-04-24 | 华南理工大学 | 基于Android平台的PhoneGap跨平台媒体扩展框架 |
| US20150040099A1 (en) * | 2013-07-31 | 2015-02-05 | Sap Ag | Extensible applications using a mobile application framework |
| CN105354013A (zh) * | 2014-08-18 | 2016-02-24 | 阿里巴巴集团控股有限公司 | 应用界面渲染方法及装置 |
| CN106502656A (zh) * | 2016-10-09 | 2017-03-15 | 武汉斗鱼网络科技有限公司 | 一种ios系统中列表视图构建方法及系统 |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114327728A (zh) * | 2021-12-29 | 2022-04-12 | 浪潮卓数大数据产业发展有限公司 | 一种应用单元格构建方法、设备及介质 |
| CN114489643A (zh) * | 2022-01-10 | 2022-05-13 | 宝宝巴士股份有限公司 | 一种iOS应用内启动多弹框的方法 |
| CN114625460A (zh) * | 2022-02-24 | 2022-06-14 | 北京百度网讯科技有限公司 | 图文混排方法、装置、设备以及存储介质 |
| CN114625460B (zh) * | 2022-02-24 | 2024-02-06 | 北京百度网讯科技有限公司 | 图文混排方法、装置、设备以及存储介质 |
| CN115237413A (zh) * | 2022-09-22 | 2022-10-25 | 北京达佳互联信息技术有限公司 | 一种列表处理方法、装置、电子设备及存储介质 |
| CN115237413B (zh) * | 2022-09-22 | 2023-02-24 | 北京达佳互联信息技术有限公司 | 一种列表处理方法、装置、电子设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106502656A (zh) | 2017-03-15 |
| CN106502656B (zh) | 2018-08-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106502656B (zh) | 一种ios系统中列表视图构建方法及系统 | |
| CN103516538A (zh) | 一种电信级集群化应用的统一配置的方法及装置 | |
| WO2018049677A1 (en) | Method for network management based on netconf protocol, and associated network device | |
| CN104348787A (zh) | 进行网络硬盘录像机通道连接的方法及该网络硬盘录像机 | |
| CN108416866B (zh) | 一种巡检任务处理方法及设备 | |
| CN104954394A (zh) | 软件差分包制作、升级方法及服务器、终端、升级系统 | |
| CN104636629B (zh) | 一种突发性水质污染事件的分析方法及装置 | |
| JP2010267084A (ja) | 通信装置および遠隔操作システム | |
| CN103902543A (zh) | 数据库查询方法和装置及数据库系统 | |
| CN103488376A (zh) | 桌面组件融合、组合、拆分方法及设备 | |
| WO2017142390A1 (en) | A type of an auxiliary smart device for human to operate smart device interactively | |
| CN106201466A (zh) | 一种基于heat的模板管理方法 | |
| CN106713024A (zh) | 一种批量集群节点管理方法、系统及计算机集群管理节点 | |
| EP3048770A1 (en) | Method, apparatus and system for determining target user for business strategy | |
| WO2016115841A1 (zh) | 集中管理账户信息的方法和终端 | |
| CN104714713A (zh) | 一种页面互动方法及页面管理装置 | |
| CN106878082B (zh) | 一种虚拟网卡热迁移方法及其装置 | |
| CN104615678A (zh) | 实时协同位图图形编辑系统 | |
| CN110908745B (zh) | 数据分析展示方法及系统、存储介质、服务器及客户端 | |
| CN109698808A (zh) | 一种加载模板消息的方法、设备和装置 | |
| CN100592303C (zh) | 模具设计变更处理系统及方法 | |
| CN119337442A (zh) | 一种服装板片数据生成方法及装置 | |
| CN102857939A (zh) | 小区参数的配置方法及装置 | |
| CN105378674A (zh) | 多内核操作系统进程处理方法及装置 | |
| CN111586429B (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: 17857761 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: 17857761 Country of ref document: EP Kind code of ref document: A1 |