首页 > 其他 > 详细

uiimage相关问题(图片拉伸)

时间:2015-01-27 23:23:52      阅读:385      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!