如何绘制故事板以产生img文件

时间:2016-07-22 07:49:48

标签: ios swift

底部是想要结果页面

enter image description here

底部是我的故事板......

enter image description here

底部是我的结果页面......

enter image description here

我的故事板如何第一个图像文件......?

  1. 分隔符不起作用......我试试

    // saperator

       func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath)
       {
       let additionalSeparatorThickness = CGFloat(20)
       let additionalSeparator = UIView(frame: CGRectMake(0,
       cell.frame.size.height + additionalSeparatorThickness,    cell.frame.size.width, additionalSeparatorThickness))
       additionalSeparator.backgroundColor = UIColor.grayColor()
       cell.addSubview(additionalSeparator)
       }
    
  2. 背景颜色不起作用 - > storay board设置firstView和TableView背景颜色

1 个答案:

答案 0 :(得分:1)

如果你想像你发布的图片一样绘制单元格,你不应该直接使用单元格的内容视图,你应该尝试在单元格内容视图中添加另一个自定义视图,并将内容视图的背景颜色设置为{{1然后,可能会将自定义视图的UIColor.clearColor()设置为layer.cornerRadius

希望它可以帮到你。

相关问题