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)];//方法第一個參數(shù)是指圖片的左邊界到拉伸點的距離, 帶二個參數(shù)是圖片頂部到拉伸點的距離
imageView.image = image2;
[self.view addSubview:imageView];