0

I created a UIScrollView inside a UIView.
The problem now is that when I scroll it, it goes all the way up until it is outside the frame.
Frame:

[self.deliveryForm setFrame:CGRectMake(24, 330, 273, 207)];
[self.deliveryForm setContentSize:CGSizeMake(273, 307)];

enter image description here

I do not want this:
enter image description here

What shall I do to fix this?
Thank you very much!

Ra1nWarden
  • 1,170
  • 4
  • 21
  • 37

2 Answers2

2

Fix it! Thanks for all the help.

Just check clip subviews fix everything

UIView hide children views when out of bounds

Community
  • 1
  • 1
Ra1nWarden
  • 1,170
  • 4
  • 21
  • 37
1

otherwise simple reduce the height size

[self.deliveryForm setFrame:CGRectMake(24, 330, 273, 207)];
[self.deliveryForm setContentSize:CGSizeMake(273, 207)];
Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143