在一个矩形视图中,不同侧面绘制了拼图形状。
将 MAPuzzleShapeView.h/m
拖放到您的项目中。
CGRect frame = CGRectMake(0.f, 0.f, 200.f, 100.f);
MAPuzzleShapeView puzzleShapeView = [[MAPuzzleShapeView alloc] initWithFrame:CGRectZero];
puzzleShapeView.shapeLength = 30.f;
puzzleShapeView.shapeAlignment = UIViewShapeAlignmentOnX;
puzzleShapeView.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:puzzleShapeView];