Eureka: how to change Section height

Created on 11 Nov 2015  路  2Comments  路  Source: xmartlabs/Eureka

how to change Section height

documentation help wanted section height

Most helpful comment

if you want to make a section header height to 0, you can use to following code.

$0.header = HeaderFooterView<UIView>(HeaderFooterProvider.class)
$0.header?.height = { CGFloat.leastNormalMagnitude }

All 2 comments

A section consists of a header, rows and a footer. Each cell has a height variable so you can set the height of each row.
If you are setting the header and footer with strings you can also set the height for that header or footer in the initializer like this:

Section("FieldRow examples") {
        $0.header?.height = { 100 }
}

You can also set the header or footer like this if you have a custom view:

var header = HeaderFooterView<MyHeaderNibFile>(.NibFile(name: "MyHeaderNibFile", bundle: nil))        
header.onSetupView = { view, _, _ in
     // customize header
 }

header.height = { 100 }
section.header = header

Look here for more information: https://github.com/xmartlabs/Eureka#section-header-and-footer

if you want to make a section header height to 0, you can use to following code.

$0.header = HeaderFooterView<UIView>(HeaderFooterProvider.class)
$0.header?.height = { CGFloat.leastNormalMagnitude }
Was this page helpful?
0 / 5 - 0 ratings