I have a UIScrollView... inside of that UIScrollView is a UIView (Content Container)... inside that Content Container are 3 Views...
- A Label
- Another UIView (A)
- Another UIView (B)
ALL THREE CREATED PROGRAMATICALLY
2 and 3 are both loaded from separate ReST calls... so while the view is loading they are both 30pt tall with a spinner.
After one or both of the of the calls returns I want to size them correctly (the top will get an image that is 320x320) and the bottom will get a table (size is not determined right now)...
I am trying to achieve this spacing Top of Container - 20pt - Label - 20pt - Content A - 20pt - Content B - Bottom of Container
I am using the following inside -(void) updateViewConstraints
[_containerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-20-[{label}]-20-[{content A}]-20-[{content B}]"
options:0
metrics:nil
views:viewsDictionary]];
Here is what it looks like after the call to get the content for A is returned:
I am literally ready to stab my eyes out... I have no idea why this is so difficult. The frame for Content B looks like this: Other Frame: {{0, 150}, {320, 30}}, Bounds: {{0, 0}, {320, 30}}
What I'm ultimately trying to do is create a UIScrollView that will allow me to scroll the view to see both the image and the table that will be displayed at the bottom... I have the UIScrollView and the Container View (_containerView = UIView) as IBOutlets in the IB.