# YFShrinkImage **Repository Path**: alexding_admin/YFShrinkImage ## Basic Information - **Project Name**: YFShrinkImage - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-01 - **Last Updated**: 2023-11-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # YFShrinkImage YFShrinkImage is a category of UIImage which shrink partial of image. [博客园记录: 【IOS】详解图片局部拉伸 + 实现图片局部收缩](http://www.cnblogs.com/yffswyf/p/6841254.html) ## How To Use It? #import "UIImage+YFShrink.h" UIImage *originImage = [UIImage imageNamed:@"wechat"]; //200 * 78
UIImage *shrinkImage = [originImage shrinkImageWithCapInsets:UIEdgeInsetsMake(30, 40, 30, 60) actualSize:CGSizeMake(150, 60)]; shrinkButton = [[UIButton alloc] initWithFrame:CGRectMake(20, 320, 150, 60)]; [shrinkButton setBackgroundImage:shrinkImage forState:UIControlStateNormal]; [self.view addSubview:shrinkButton]; # Effection:  