Footer x section Fixed Swift

0

Currently my UITableView has x sections each with a footer, the problem is that it is stuck and my idea is to behave as one more cell,

I already try to put the Grouped stylo on my table, but this one distorts my whole table, so I see it as unfeasible,

So I add my footer

func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {

    let view = UIView()
    view.backgroundColor = UIColor.white

    switch (section)
    {
    case 0 :
        if accountHidden
        {

        }
        else{
           view.addBottomBorder(Utils.Color.COLOR_9A9A9A, height: 1.0, separation: 0.0)
        }

        break
    case 1:
        if creditHidden
        {

        }
        else{
        view.addBottomBorder(Utils.Color.COLOR_9A9A9A, height: 1.0, separation: 0.0)
        }
        break
    case 2:
        if cardHidden
        {

        }
        else{
          view.addBottomBorder(Utils.Color.COLOR_9A9A9A, height: 1.0, separation: 0.0)
        }
        break
    case 3:
        if inversionsHidden
        {

        }
        else{
            view.addBottomBorder(Utils.Color.COLOR_9A9A9A, height: 1.0, separation: 0.0)
        }
        break
    default:
        break

    }

    return view
}

Since any help is already welcome, I ask for the Hidden because it reloads when the sections are clicked to look like an accordion,

    
asked by Bruno Sosa Fast Tag 17.05.2018 в 17:11
source

0 answers