Got a strange problem which I dont understand.
I set the content size to a CGSize I created called newSize. I am adding buttons in a row in the UIScrollView that goes outside of the frame of the scrollview and changing the content size to match the new width + 400 for insurance.
newSize.width = contentSizeWidth+400;
NSLog(@"newSize width: %f", newSize.width);
[_scrollViewOutlet addSubview:button];
[_scrollViewOutlet setContentSize:newSize];
NSLog(@"scrollviewOutlet Content Width: %f", _scrollViewOutlet.contentSize.width);
the NSLog prints out 768. scrolling is enabled in the scrollview in interface builder but I cannot scroll the scrollview? What could the problem be?
contentSizeWidth
? – Marcus AdamscontentSizeWidth
has a hard-coded value? – Marcus AdamsviewDidLoad
? – Marcus Adams