iOS cannot change frame of UIButton

前端 未结 5 690
醉酒成梦
醉酒成梦 2021-01-04 06:23

I am currently stuck with a very weird problem. I am using iOS 6 and Xcode 4.5. I have a storyboard with a UIViewController and a UIButton in it. I

5条回答
  •  不知归路
    2021-01-04 07:14

    You can change frame of your UIButton by changing layer's frame of UIButton

     [self.button.layer setFrame:] 
    

    import QuartzCore framework in your class header before using this. This will work with auto layout also.

提交回复
热议问题