emachine
emachine

Reputation: 1163

Adding a UIView below the screen

I have a UIViewController added using addSubview hanging out on top of another UIViewController. I would like the added view to hang out below the screen to be called up with a nice animation when I need it.

Is there a way to add a subview to a screen at a certain location?

Upvotes: 0

Views: 208

Answers (1)

kennytm
kennytm

Reputation: 523294

You could modify its .frame property, e.g.

[self.view addSubview:theView];
CGRect newFrame = theView.frame;
newFrame.origin.y = self.view.bounds.size.height;
theView.frame = newFrame;

Upvotes: 1

Related Questions