Tuesday, April 23, 2013

UIImage imageWithAlignmentRectInsets example ios


imageWithAlignmentRectInsets:

Returns a new version of the image that uses the specified alignment insets.
- (UIImage *)imageWithAlignmentRectInsets:(UIEdgeInsets)alignmentInsets
Parameters
alignmentInsets
The alignment metadata to apply to the new image.
Return Value of [UIImage imageWithAlignmentRectInsets]
A new image object.
Example of [UIImage imageWithAlignmentRectInsets]

UIImage *image = [[UIImage imageNamed:@"Shadowed.png"] 
 imageWithAlignmentRectInsets :UIEdgeInsetsMake(0, 0, 20, 20)]; 
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];