Ra1nWarden
Ra1nWarden

Reputation: 1200

set UIScrollView Visible area

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!

Upvotes: 0

Views: 2340

Answers (2)

Ra1nWarden
Ra1nWarden

Reputation: 1200

Fix it! Thanks for all the help.

Just check clip subviews fix everything

UIView hide children views when out of bounds

Upvotes: 2

Anbu.Karthik
Anbu.Karthik

Reputation: 82759

otherwise simple reduce the height size

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

Upvotes: 1

Related Questions