Ios Objective-C框架与裁剪器边界角
我想改变像这样的边界角的设计,有人能帮我吗?Ios Objective-C框架与裁剪器边界角,ios,objective-c,objective-c-framework,Ios,Objective C,Objective C Framework,我想改变像这样的边界角的设计,有人能帮我吗? 目前我正在使用此代码初始化BJMageCropper: self.imageCropper = [[BJImageCropper alloc] initWithImage:self.image andMaxSize:CGSizeMake(750,350)]; self.imageCropper.center = self.cropView.center; self.imageCropper.imageView.la
目前我正在使用此代码初始化BJMageCropper:
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];
如果有任何其他用于图像裁剪的框架具有与示例图像类似的边界角,这可能也会有所帮助 我使用了,它实际上是BJImageCropper的修改版本。您将在中获得BJImageCropper的所有代理方法。替换bCropInterface.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"]];
其中.pngs类似于
并在我的代码中使用以下工具实现了该框架:
[[BFCropInterface alloc]initWithFrame:self.cropView.bounds andImage:original nodeRadius:50];
增大nodeRadius
的值以增大角点图像的大小