Я пытаюсь создать UILabel в подклассе UITableViewCell, чтобы сделать его полной шириной ячейки. Но contentView всегда 320pt, если в iPhone 7 или 7+.
Код:
import UIKit
import SwipeCellKit
class ReuseableCell: SwipeTableViewCell
{
public var test = UILabel();
var animator: Any?
override init(style: UITableViewCellStyle, reuseIdentifier: String!)
{
super.init(style: style, reuseIdentifier: reuseIdentifier);
// Always 320pt and I want full width of the table cell
var width = self.contentView.frame.width;
test = UILabel(frame: CGRect(x: 0, y: 0, width: width, height: 100));
test.text = "Lorem ipsum...";
...
Я застрял на этом на 2 ночи. Спасибо.