Change a UIView Frame

前端 未结 4 647
执念已碎
执念已碎 2021-01-23 07:48

I have set a UIView in my storyboard and make it an outlet.

 @property (nonatomic, weak) IBOutlet UIView *testView;

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-23 07:49

    You might enabled the autolayout in your project , if so the setFrame straightly won't work . Check here for more info

    Solution :

    • Disable the autolayout, if you don't need any more
    • Check the above link using with the autolayout .

提交回复
热议问题