Swift中设置tableview的分割线(separator)的样式、颜色、边距

Swift中设置tableview的分割线(separator)的样式、颜色、边距

    //设置分割线样式
    // 三种分割线样式:
    // case None  无分割线
    // case SingleLine 单条分割线
    // case SingleLineEtched // This separator style is only supported for grouped style table views currently

    self.tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine
    //设置分割线颜色
    self.tableView.separatorColor = UIColor.redColor()
    //设置分割线内边距
    self.tableView.separatorInset = UIEdgeInsetsMake(0, 0, 0, 0)

猜你喜欢

转载自blog.csdn.net/sinat_34194127/article/details/51755917
今日推荐