当前位置: 首页 > news >正文

国外平面设计欣赏网站互联网推广运营是做什么的

国外平面设计欣赏网站,互联网推广运营是做什么的,网站建设的教材,知名做网站公司有哪些UITableView自定义TableHeader和TableFooter 我猜你希望的效果是这样的 我猜你希望的效果是这样的 自定义页眉视图 让我们创建一个文件名 UITableViewHeaderFooterView 的 CustomerHeaderView 子类。 现在让我们创建视图的 Xib 文件并将其命名为 CustomHeaderView。 更改高度标…

UITableView自定义TableHeader和TableFooter

    • 我猜你希望的效果是这样的

我猜你希望的效果是这样的

在这里插入图片描述

自定义页眉视图
让我们创建一个文件名 UITableViewHeaderFooterView 的 CustomerHeaderView 子类。
在这里插入图片描述
现在让我们创建视图的 Xib 文件并将其命名为 CustomHeaderView。

在这里插入图片描述

更改高度标题视图在创建的 XIB 文件中选择视图。在属性检查器中选择大小并将其大小设置为自由度

在这里插入图片描述

自定义页脚视图 让我们创建一个文件名 UITableViewHeaderFooterView 的客户页脚视图
子类并重复上述步骤。

在主类文件中,寄存器头视图和页脚视图在视图中的表视图DidLoad

class ViewController: UIViewController {
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
tableView.register(UINib(nibName: "CustomHeaderView", bundle: nil), forHeaderFooterViewReuseIdentifier: "CustomHeaderView")
tableView.register(UINib(nibName: "CustomFooterView", bundle: nil), forHeaderFooterViewReuseIdentifier: "CustomFooterView")}
}
 func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {let indentifier = "CustomHeaderView"let cell = tableView.dequeueReusableHeaderFooterView(withIdentifier: indentifier)if section == 0 {cell?.contentView.backgroundColor = .cyan}if section == 1 {cell?.contentView.backgroundColor = .red}return cell}func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {let indentifier = "CustomHeaderView"let cell = tableView.dequeueReusableHeaderFooterView(withIdentifier: indentifier)cell?.contentView.backgroundColor = UIColor.tableSectionColor()return cell}func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {return 100}func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {return 50 }
http://www.zhongyajixie.com/news/49825.html

相关文章:

  • 济南网站设计seo服务包括哪些
  • ajax网站开发技术郑州厉害的seo优化顾问
  • 政府网站设计思路广州百度seo
  • 扬中网seo案例分析方案
  • 易语言做电影网站源码辽阳网站seo
  • 做网站要身份证吗卢松松外链工具
  • 网站首页加浮动窗口seo排名优化是什么意思
  • 烟台专业网站推广北京百度seo排名公司
  • 找国外公司做网站公司网页怎么做
  • 古镇做灯饰网站的公司google中文搜索引擎
  • 简单网页制作成品代码搜索引擎优化指南
  • 专业网站建设商城价格保定seo博客
  • 如何制作和设计公司网站百度联盟怎么加入赚钱
  • 个人网站的制作代码东莞网站seo公司哪家大
  • 男女做羞羞的故事网站网站的网站建设
  • 个人网站欣赏的网站seo软件全套
  • 北京做网站设计招聘公司怎么做网站推广
  • 武汉好的seo优化网兰州快速seo整站优化招商
  • 易企cms网站模板深圳网络推广最新招聘
  • 网站如何做关键字收录网络营销与推广
  • wordpress底部黑色的版权修改郑州网站优化培训
  • 判断网站是什么系统做的seo独立站优化
  • 安阳公司做网站seo外包公司一般费用是多少
  • 苹果电脑用什么软件做网站seo优化外链平台
  • 知乎 网站开发工具刷推广链接
  • wordpress主题出错网站seo排名公司
  • 做石膏选图形的网站企业网页
  • 网站前端做报名框代码免费google账号注册入口
  • 网站被挂马做js跳转凡科建站官网入口
  • 西安做网站公司市场推广方案ppt