remove useless code, add gitignore
This commit is contained in:
parent
9c909b8471
commit
7d9d6ff60b
|
|
@ -0,0 +1,39 @@
|
|||
# Mac OS X
|
||||
.DS_Store
|
||||
|
||||
# Xcode
|
||||
|
||||
## Build generated
|
||||
build/
|
||||
DerivedData
|
||||
|
||||
## Various settings
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
|
||||
## Other
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
*.xcuserstate
|
||||
*.xcscmblueprint
|
||||
|
||||
## Obj-C/Swift specific
|
||||
*.hmap
|
||||
*.ipa
|
||||
|
||||
## Playgrounds
|
||||
timeline.xctimeline
|
||||
playground.xcworkspace
|
||||
|
||||
# Swift Package Manager
|
||||
.build/
|
||||
|
||||
# Carthage
|
||||
Carthage/Build
|
||||
Binary file not shown.
|
|
@ -139,11 +139,11 @@ public extension TableDirector {
|
|||
}
|
||||
|
||||
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
return sections[section].headerHeight
|
||||
return sections[section].headerView?.frame.size.height ?? UITableViewAutomaticDimension
|
||||
}
|
||||
|
||||
|
||||
func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
|
||||
return sections[section].footerHeight
|
||||
return sections[section].footerView?.frame.size.height ?? UITableViewAutomaticDimension
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,10 +34,7 @@ public class TableSectionBuilder {
|
|||
public var footerTitle: String?
|
||||
|
||||
public var headerView: UIView?
|
||||
public var headerHeight: CGFloat = UITableViewAutomaticDimension
|
||||
|
||||
public var footerView: UIView?
|
||||
public var footerHeight: CGFloat = UITableViewAutomaticDimension
|
||||
|
||||
/// A total number of rows in section of each row builder.
|
||||
public var numberOfRowsInSection: Int {
|
||||
|
|
@ -54,13 +51,10 @@ public class TableSectionBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
public init(headerView: UIView? = nil, headerHeight: CGFloat = UITableViewAutomaticDimension, footerView: UIView? = nil, footerHeight: CGFloat = UITableViewAutomaticDimension) {
|
||||
public init(headerView: UIView? = nil, footerView: UIView? = nil) {
|
||||
|
||||
self.headerView = headerView
|
||||
self.headerHeight = headerHeight
|
||||
|
||||
self.footerView = footerView
|
||||
self.footerHeight = footerHeight
|
||||
}
|
||||
|
||||
// MARK: Public
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ class TabletTests: XCTestCase {
|
|||
let sectionHeaderView = UIView()
|
||||
let sectionFooterView = UIView()
|
||||
|
||||
let section = TableSectionBuilder(headerView: sectionHeaderView, headerHeight: 44, footerView: sectionFooterView, footerHeight: 44)
|
||||
let section = TableSectionBuilder(headerView: sectionHeaderView, footerView: sectionFooterView)
|
||||
section += row
|
||||
|
||||
testController.view.hidden = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue