Image manipulation
Here is an example (not tested, just to show you an idea):
-(UIImage *)imageWithImage:(UIImage *)image borderImage:(UIImage *)borderImage covertToSize:(CGSize)size {
UIGraphicsBeginImageContext(size);
[borderImage drawInRect:CGRectMake( 0, 0, size.width, size.height )];
[image drawInRect:CGRectMake( 10, 10, size.width - 20, size.height - 20)];
UIImage *destImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return destImage;
}
, , . , , borderImage . , ( drawRect: calls).
, , , Quartz CALayer.
self.imageView.layer.cornerRadius = 3.0;
self.imageView.layer.masksToBounds = YES;
self.imageView.layer.borderColor = [UIColor blackColor].CGColor;
self.imageView.layer.borderWidth = 1.0;