Q:

iOS UIScrollview Auto Layout - UILayoutFittingCompressedSize

I'm following Apple's guidelines on implementing Auto Layout with UIScrollView at the link below.
http://developer.apple.com/library/ios/#releasenotes/General/RN-iOSSDK-6_0/index.html
It says, "Alternatively, you can create a view subtree to go in the scroll view, set up your constraints, and call the systemLayoutSizeFittingSize: method (with the UILayoutFittingCompressedSize option) to find the size you want to use for your content view and the contentSize property of the scroll view."
My problem is, when I call     
CGSize newSize = [self.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize];

newSize has widths that are greater than 320. 
How can I constrain it so that the newSize has a width of 320, and so the function systemLayoutSizeFittingSize returns a large height to fit all the views? Is there a different argument I could use instead of UILayoutFittingCompressedSize?
Thanks!
EDIT: I have a UILabel subview of contentView, and it's numberOfLines is set to 0. However, I see that when I call sizeThatFits on this UILabel, it returns widths greater than 320. As a result, the self.contentView method call returns a newSize that is big enough to support the UILabel. 
Therefore, I think the problem originates with my UILabel. How do I make sure that the UILabel, when sizeToFit is called, returns a width that is less than 320, so only the height is scaled to fit the body of the text?

A:

Found a solution.
The property called preferredMaxLayoutWidth for UILabel worked for me. I applied it to the UILabel with a value of 320, and now the self.contentView method does not return a width greater than 320. 
It is interesting to note that the UILabel sizeThatFits method DOES NOT take into consideration the preferredMaxLayoutWidth, as the CGSize it returned still had widths greater than the prefferedMaxLayoutWidth.

