UIImageView * imageView = [[UIImageView alloc]initWithFrame:CGRectMake(50, 50, 300, 500)];
UIImage * image2 = [image1 stretchableImageWithLeftCapWidth:floorf(image1.size.width - 10) topCapHeight:floorf(image1.size.height - 70)];//方法第一个参数是指图片的左边界到拉伸点的距离, 带二个参数是图片顶部到拉伸点的距离
imageView.image = image2;
[self.view addSubview:imageView];