Does anyone know how to create a UITableView with a curved frame, such as loading MacOS (in the Dock) on iOS?

I tried to use the UIBezierPath class for this, but unfortunately I did not succeed. For example, I did this:
_tableView = [[TVCurveTableView alloc] initWithFrame:CGRectMake(10, self.view.frame.size.height - 130, 70, 160)]; UIBezierPath *bezierPath = [[UIBezierPath alloc]init]; [bezierPath moveToPoint:CGPointMake(10, self.view.frame.size.height - 10)]; [bezierPath addLineToPoint:CGPointMake(40, (self.view.frame.size.height-10) - 160)]; [bezierPath addLineToPoint:CGPointMake(110, (self.view.frame.size.height-10) - 160)]; [bezierPath addLineToPoint:CGPointMake(80, (self.view.frame.size.height-10))]; [bezierPath addLineToPoint:CGPointMake(10, (self.view.frame.size.height-10))]; [bezierPath closePath]; bezierPath.lineWidth = 2; CAShapeLayer *shapeView = [[CAShapeLayer alloc] init]; [shapeView setPath:bezierPath.CGPath]; shapeView.strokeColor = [UIColor redColor].CGColor; [_tableView.layer addSublayer:shapeView];
Perhaps you have some ideas?
source share