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];

 

posted @ 2015-01-27 22:06  离子  阅读(213)  评论(0编辑  收藏  举报