I have a table, there is a cell that contains contentView, on which UIView, and in it UITextViewI already need for the cornerRadiustop left, top right, bottom left (as in the picture)

But in case of launching the application, it shows me like this:

If you scroll the table (scroll this cell) and vice versa, then it is displayed as necessary. Help to do this in the case of starting directly, it was displayed as needed, here is the code that is responsible for it cellForRowAtIndexPath:
UIRectCorner rectCorner = UIRectCornerTopLeft | UIRectCornerBottomLeft | UIRectCornerTopRight;
UIBezierPath *maskPath;
maskPath = [UIBezierPath bezierPathWithRoundedRect:cell.viewMessage.bounds
byRoundingCorners:rectCorner
cornerRadii:CGSizeMake(20.0, 20.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.path = maskPath.CGPath;
cell.viewMessage.layer.masksToBounds = YES;
cell.viewMessage.layer.mask = maskLayer;
source
share