当view离开storyboard时,initWithFrame就不会被调用了,But,当view离开storyboard时,awakeFromNib(在view.m文件里)会被调用,可以在它里面设置当旋转手机时,重绘图像self.contentMode = UIViewContentModeRedraw(self代表uiview)
awakefromnib()由storyboard产生,不过这个时候outlets都没有连接起来
当view离开storyboard时,initWithFrame就不会被调用了,But,当view离开storyboard时,awakeFromNib(在view.m文件里)会被调用,可以在它里面设置当旋转手机时,重绘图像self.contentMode = UIViewContentModeRedraw(self代表uiview)
awakefromnib()由storyboard产生,不过这个时候outlets都没有连接起来