UIButton的拉伸
1.拿到button的背景图片
UIImage *image = self.loginBtn.currentBackgroundImage;
2.拉伸图片
iamge = [image stretchableImageWithLeftCapWidth:image.size.width/2 topCapHeight:image.size.height/2];
3.设置背景图片
[self.loginBtn setBackgroundImage:image forState:UIControlStateNormal];