I have set a UIView
in my storyboard
and make it an outlet.
@property (nonatomic, weak) IBOutlet UIView *testView;
You might enabled the autolayout in your project , if so the setFrame
straightly won't work . Check here for more info
Solution :
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.
Assuming its connected to your XIB do the following after changing the view -
[self.view setNeedsDisplay];
Trying changing the height to high number and see if that make a difference. I have created demo project for changing and reverting the height. Hope this helps.
https://github.com/rshankras/StackOverflowUIView