@@ -24,7 +24,7 @@ public class ZHTableViewDataSource: NSObject {
2424 }
2525
2626 /// ZHTableViewGroup的数组
27- public var groups : [ ZHTableViewGroup ] = [ ]
27+ private var groups : [ ZHTableViewGroup ] = [ ]
2828
2929 /// 初始化ZHTableViewDataSource数据源
3030 ///
@@ -35,14 +35,14 @@ public class ZHTableViewDataSource: NSObject {
3535 }
3636
3737 /// 托管 UITableView 的对象
38- var tableView : UITableView
38+ private var tableView : UITableView
3939
4040 public func reloadTableViewData( ) {
4141 self . registerClass ( )
4242 self . tableView. reloadData ( )
4343 }
4444
45- func registerClass( ) {
45+ private func registerClass( ) {
4646 for group in self . groups {
4747 group. registerHeaderFooterCell ( tableView: self . tableView)
4848 }
@@ -86,7 +86,7 @@ public class ZHTableViewDataSource: NSObject {
8686 /// - dataSource: ZHTableViewDataSource的数据源可以为 nil
8787 /// - section: 分组的索引
8888 /// - Returns: 对应分组对象可能为 nil
89- class func groupForSection( dataSource: ZHTableViewDataSource ? , section: Int ) -> ZHTableViewGroup ? {
89+ private class func groupForSection( dataSource: ZHTableViewDataSource ? , section: Int ) -> ZHTableViewGroup ? {
9090 guard let dataSource = dataSource else {
9191 // 当用户还没有创建ZHTableViewDataSource对象返回 nil
9292 return nil
@@ -98,7 +98,7 @@ public class ZHTableViewDataSource: NSObject {
9898 return dataSource. groups [ section]
9999 }
100100
101- class func cellForIndexPath( dataSource: ZHTableViewDataSource ? , atIndexPath indexPath: IndexPath ) -> ZHTableViewCell ? {
101+ private class func cellForIndexPath( dataSource: ZHTableViewDataSource ? , atIndexPath indexPath: IndexPath ) -> ZHTableViewCell ? {
102102 guard let group = groupForSection ( dataSource: dataSource, section: indexPath. section) else {
103103 return nil
104104 }
@@ -124,7 +124,7 @@ public class ZHTableViewDataSource: NSObject {
124124 return heightWithCustomHandle ( height: cell. height, customCompletionHandle: customHeightCompletionHandle)
125125 }
126126
127- class func heightWithCustomHandle( height: CGFloat , customCompletionHandle: ZHTableViewDataSourceCustomHeightCompletionHandle ? ) -> CGFloat {
127+ private class func heightWithCustomHandle( height: CGFloat , customCompletionHandle: ZHTableViewDataSourceCustomHeightCompletionHandle ? ) -> CGFloat {
128128 if height == CGFloat ( NSNotFound) {
129129 guard let customCompletionHandle = customCompletionHandle else {
130130 return 0
@@ -151,7 +151,7 @@ public class ZHTableViewDataSource: NSObject {
151151 return heightForHeaderFooterInSection ( dataSource: dataSource, section: section, customHeightCompletionHandle: customHeightCompletionHandle, headerFooterStyle: . footer)
152152 }
153153
154- class func heightForHeaderFooterInSection( dataSource: ZHTableViewDataSource ? , section: Int , customHeightCompletionHandle: ZHTableViewDataSourceCustomHeightCompletionHandle ? , headerFooterStyle: ZHTableViewHeaderFooterStyle ) -> CGFloat {
154+ private class func heightForHeaderFooterInSection( dataSource: ZHTableViewDataSource ? , section: Int , customHeightCompletionHandle: ZHTableViewDataSourceCustomHeightCompletionHandle ? , headerFooterStyle: ZHTableViewHeaderFooterStyle ) -> CGFloat {
155155 guard let group = groupForSection ( dataSource: dataSource, section: section) else {
156156 return 0
157157 }
@@ -179,7 +179,7 @@ public class ZHTableViewDataSource: NSObject {
179179 return viewHeaderFooterInSection ( dataSource: dataSource, section: section, style: . footer)
180180 }
181181
182- class func viewHeaderFooterInSection( dataSource: ZHTableViewDataSource ? , section: Int , style: ZHTableViewHeaderFooterStyle ) -> UITableViewHeaderFooterView ? {
182+ private class func viewHeaderFooterInSection( dataSource: ZHTableViewDataSource ? , section: Int , style: ZHTableViewHeaderFooterStyle ) -> UITableViewHeaderFooterView ? {
183183 guard let group = groupForSection ( dataSource: dataSource, section: section) else {
184184 return nil
185185 }
0 commit comments