I have this picture:
I want to add UIImageView
s as subviews and I want images to be "crooked" with background.
I think i must use kCGBlendModeMultiply
.
Any ideas how to solve this issue?
I have this picture:
I want to add UIImageView
s as subviews and I want images to be "crooked" with background.
I think i must use kCGBlendModeMultiply
.
Any ideas how to solve this issue?
You can create a subclass of UIView and override drawRect.
For example, I created a subclass named CrinkedView. The .h looks like this:
#import <UIKit/UIKit.h>
IB_DESIGNABLE
@interface CrinkedView : UIView
@property (nonatomic, strong) IBInspectable UIImage *crinkedImage;
@end
And the .m like this:
#import "CrinkedView.h"
@implementation CrinkedView
-(void)setCrinkedImage:(UIImage *)crinkedImage
{
_crinkedImage = crinkedImage;
[self setNeedsDisplay];
}
- (void)drawRect:(CGRect)rect {
[[UIImage imageNamed:@"vI745.jpg"] drawInRect:self.bounds];
if (self.crinkedImage) {
[self.crinkedImage drawInRect:self.bounds blendMode:kCGBlendModeMultiply alpha:1.0];
}
}
@end