I wish this help you I have placed UIView in UIScrollView in Storyboard. The UIView is pinned to the all the sides of the UIScrollView. I am trying to set the size of UIView programatically because it is needed for scrolling to work properly. How can I programmatically set the width and height of the UIView? for any help as I am trying to solve the problem already for a week... , You'll need to change the frame of your view as below:
around this issue i use Storyboard and i want to duplicate and add an existing UIView (with all "childs" like UILabels) progammatically to a ScrollView. So first i created a custom UIView-Class for that View (EventView) in which i initialize the new text for the UILabels by identifying them with their Tags. Now i want to add these EventViews to a Scrollview like this: , to duplicate a view or ui object there is a method i learned here
wish help you to fix your issue Acording to this answer The methods viewWillAppear: and viewDidLoad: have no layout information. Any layout changes made here will be lost when viewDidLayoutSubviews: is called later on.