ios 缩放图片(平铺)

//缩放图片(平铺)

- (UIImage *)resizeImage:(NSString *)imgName

{

    UIImage *bgImage =  [UIImage imageNamed:imgName];

    //缩放图片

    bgImage = [bgImage stretchableImageWithLeftCapWidth:bgImage.size.width / 2 topCapHeight:bgImage.size.height / 2];

    return bgImage;

}

posted on 2016-02-25 23:40  许鸣  阅读(567)  评论(0编辑  收藏  举报