Change a UIView Frame

前端 未结 4 648
执念已碎
执念已碎 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:50

    Look at the tiny circle to the left of the property. Is it filled in or hollow? If it's hollow, then it means that you have not connected this particular element of the storyboard to the file's owner.

    If the circle is filled in, than the outlet IS connected to something on your storyboard. Just make sure it's connected to the right entity, namely the UIViewController (or subclass thereof) that you are declaring testView within.

提交回复
热议问题