How to make a image resize use Nine-Blocks?

Sometimes we should use a image that size will be sometimes big and sometimes small, so we can not prepare so many images for it, so we can use a small image, and make the centre is a kind of pure colour, then use the method: code

UIImage *image = [UIImage imageNamed:@"tree/tree_bottom"];
UIEdgeInsets bgEdgeInsets = UIEdgeInsetsMake(17, 17, 17, 17);
image = [image resizableImageWithCapInsets:bgEdgeInsets resizingMode:UIImageResizingModeTile];



to make many tiles to fill the big image.

so it can fix the issue perfectly. it

Thanks, class

Blues im

相關文章
相關標籤/搜索