UITableView中的iOS自定义页脚视图问题

UITableView中的iOS自定义页脚视图问题,ios,uitableview,viewcontroller,Ios,Uitableview,Viewcontroller,我试图为UITableView创建页脚视图,但我面临这些问题 首先,我不知道如何为UITableView创建页脚视图。我 知道我可以在Nib中单独进行设计。所以我就这么做了。现在我 不知道如何将该页脚加载为UITableViewsticky footer “我的页脚”将有两个子视图&这些视图是TextField和按钮 在页脚中有TextField,这将是一个问题,因为键盘将覆盖它们,用户将无法看到他正在键入的内容 请告诉我怎么做 使用此数据源显示页脚-> 首先根据您的要求创建设计账款,并返回给上

我试图为
UITableView
创建页脚视图,但我面临这些问题

  • 首先,我不知道如何为
    UITableView
    创建页脚视图。我 知道我可以在Nib中单独进行设计。所以我就这么做了。现在我 不知道如何将该页脚加载为
    UITableView
    sticky footer

  • “我的页脚”将有两个子视图&这些视图是
    TextField
    按钮

  • 在页脚中有
    TextField
    ,这将是一个问题,因为键盘将覆盖它们,用户将无法看到他正在键入的内容

  • 请告诉我怎么做

  • 使用此数据源显示页脚->

  • 首先根据您的要求创建设计账款,并返回给上述代表

  • 要解决此问题,可以使用。它会自动管理您的键盘布局

  • func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
    
        let footerView = tableView.dequeueReusableCell(withIdentifier: "FooterView") as! FooterTableViewCell
    
        return footerView
    }
    
    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        return 100
    }