Search code examples
uiscrollviewios6iphone-5

ScrollView's content size not working


I have put a scrollview and there are labels and button over it. I have set the content size to even bigger like [scrollview setContentSize:CGSizeMake(320,700)] but still the scrollview is not scrolling upto the height which i have mentioned in content size. It gets worse when i run it using iPhone 4 retina inch simulator i.e it does not scroll at all. I have tried finding the auto layout property in the xib but it was not there.

Initially i thought that it is iPhone 4 retina issue but later i found that setting content size is not affecting scrolling of even iPhone 3.5 inch retina simulator. I have searched every bit about it but of no use.

Any help please. Thanks in advance


Solution

  • In the file inspector uncheck the auto layout option. That will solve the problem