首页 > 代码库 > uiimage相关问题(图片拉伸)

uiimage相关问题(图片拉伸)

UIImage *backgroundImage= [UIImage imageNamed:@"bg_headimage"];    //图片拉伸    UIImage *newImage=[backgroundImage resizableImageWithCapInsets:UIEdgeInsetsMake(10, 10, 10, 10) resizingMode:UIImageResizingModeStretch];    UIImageView *backGroundImageView=[[UIImageView alloc]initWithImage:newImage];    backGroundImageView.frame=CGRectMake(0, 0,backgroundImage.size.width/2.0, backgroundImage.size.height/2.0+40);    [contentScrollView addSubview:backGroundImageView];

 

uiimage相关问题(图片拉伸)