I spent hours of my day today just to hide PickerView when my app is loaded, but the problem is not with the PickerView. it\'s with CGRectMake.
I tried a simple proj
Make sure that your
IBOUTLETconnection is joined with the view.
If you have AutoLayout enabled for the Storyboard then changing the frame of a view won't work.
You can't change frames directly using AutoLayout. You have to change the constraints around them.
If you disable AutoLayout for the Storyboard it will work.
CGrectmake working only because you set frame size as CGRectMake(0, 0, 320, 204); as per the size the custom view will be visible inside the main view if you want to hide change x or y co-ordinates to out of bound value like this. Then don forget to uncheck autolayout
container.frame = CGRectMake(200, 0, 320, 204);