This is my code but not work!
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! MyChatCell
    var frame = cell.frame
    if(indexPath%2 == 0){
        frame.size.width = CGFloat(200)
    } else {
        frame.size.width = CGFloat(100)
    }
    cell.frame = frame
    return cell
}
I want change cell width to 100 or 200 per cell
But frame.size.width not work
 
    