答案 0 :(得分:0)
UIImage * originalImg = [UIImage imageNamed:@" yourimagename"];
//Either you can use this
//UIImage *resizeImg = [originalImg resizableImageWithCapInsets:UIEdgeInsetsMake(4, 50, 30, 50) resizingMode:UIImageResizingModeStretch];
//or you can use this
UIImage *resizeImg = [originalImg resizableImageWithCapInsets:UIEdgeInsetsMake(4, 214, 30, 55) resizingMode:UIImageResizingModeStretch];
//Before resize
self.original_Imageview.image = originalImg;
//after resize
self.resized_Imageview.image = resizeImg;
You can use this code to set your image
[This is output image][1]
[1]: http://i.stack.imgur.com/iJV9X.png