Objective-C框架BJImageCropper边框角

Objective-C framework BJImageCropper Border corner

我想更改 BJImageCropper like this Sample Image 的边角设计,谁能帮我解决这个问题?

目前我正在使用此代码初始化 BJImageCropper :

self.imageCropper = [[BJImageCropper alloc] initWithImage:self.image andMaxSize:CGSizeMake(750,350)];

        self.imageCropper.center = self.cropView.center;
        self.imageCropper.imageView.layer.shadowColor = [[UIColor blackColor] CGColor];
        self.imageCropper.imageView.layer.shadowRadius = 3.0f;
        self.imageCropper.imageView.layer.shadowOpacity = 0.8f;
        self.imageCropper.imageView.layer.shadowOffset = CGSizeMake(1, 1);

        [self.imageCropper addObserver:self forKeyPath:@"crop" options:NSKeyValueObservingOptionNew context:nil];

如果有任何其他图像裁剪框架具有像示例图像那样的边框角,那也可能有帮助。

我用过BFCropInterface, which is actually modified version of BJImageCropper. You will get all delegate methods of BJImageCropper in BFCropInterface.
替换了 BFCropInterface.m

中的以下部分
 UIImage *nodeImage = [UIImage imageNamed:@"node.png"];
    tlnode = [[UIImageView alloc]initWithImage:nodeImage];
    trnode = [[UIImageView alloc]initWithImage:nodeImage];
    blnode = [[UIImageView alloc]initWithImage:nodeImage];
    brnode = [[UIImageView alloc]initWithImage:nodeImage];

有了这个 :

tlnode = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"top-left.png"]];
    trnode = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"top-right.png"]];
    blnode = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bottom-left.png"]];
    brnode = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bottom-right.png"]]; 

其中 .png 类似于

并在我的代码中实现了框架:

[[BFCropInterface alloc]initWithFrame:self.cropView.bounds andImage:original nodeRadius:50];

增加nodeRadius的值以增加角图像的大小。