码迷,mamicode.com
首页 > 其他好文 > 详细

uiimage相关问题(图片拉伸)

时间:2015-01-27 23:26:14      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

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相关问题(图片拉伸)

标签:

原文地址:http://www.cnblogs.com/liyang31tg/p/4254341.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!