UIView animation
<p><img src="http://i.stack.imgur.com/6omYg.png" alt="alt text"></p>

<p>In the figure, what you see in "red" is another view that slides up once you click the first + button. This "red" view does not have a separate view controller. On every "+" button click, I want this view to slide up with a different element embedded in it. For instance, on the first "+" button click , I would like this red view to slide up with a datepicker embedded in it. On second "+" button click, I would like this red view to slide up with a UIPicker View embedded in it. I have the elements: UIDatepicker and UIPicker prepared. I don't know when and where to embed them and what should be their frame size. </p>

<p>I am initializing the "red" view in the viewDidLoad method</p>

<p>viewDidLoad
{</p>

<pre><code>CGRect frame=CGRectMake(0, CGRectGetMaxY(self.view.bounds)-70, 320, 150);

popup=[[UIView alloc]init];

popup.backgroundColor=[UIColor redColor];

[popup setFrame:frame];
</code></pre>

<p>}</p>

<p>and I am sliding it up in</p>

<p>-(void) btnClick:(id)sender
{
        frame=CGRectMake(0, 240, 320, 150);</p>

<pre><code>[UIView beginAnimations:nil context:nil];

    [popup setFrame:frame];

[UIView commitAnimations];  
</code></pre>

<p>}</p>
