2016-04-12 5 views
0

BJImageCropperのボーダーコーナーのデザインを変更したいのですが、Sample Imageのように、誰でもこれを手伝うことができますか?また、役立つかもしれないサンプル画像、などのボーダーコーナーがあり、画像のトリミングのための他のframworkがある場合Objective-Cフレームワーク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]; 



現在、私は初期BJImageCropperのためにこのコードを使用しています。

答えて

0

実際にはBJImageCropperの修正バージョンですBFCropInterfaceを使用しました。 BJImageCropperの代理人メソッドはすべてBFCropInterfaceになります。

.PNG sが This

のようなものであり、私のコードでフレームワークを実装している

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"]]; 

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]; 

における部分の下に置き換え
使用:

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

nodeRadiusの値を大きくしてコーナーイメージのサイズを大きくします。

関連する問題