I have a view in that I have dragged one more View and assigned it has
IBOutlet UIView *popupIpadView which contains tableview textfield and other button.
What my requirement is, on loading, popupIpadView will be hidden initially. When I click on a button, this PopupIpadview will appear. But I want this view to appear in am animated transition like left to right or vice versa. How can I do this?
For example, I am using the code below, but nothing happens.
- (IBAction)showPopover:(UIButton *)sender
{
popupiPhoneView.hidden = NO;
popupiPhoneView.backgroundColor = [UIColor colorWithWhite:0 alpha:.5];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDuration:3.0];
[UIView commitAnimations];
}
Instead of using Hidden property, set the alpha value to 0 and the origin to the left side out of the visible screen, say -320 x and 0 y.
In your animation block, set alpha to one while passing appropriate transition style.
Initially set your view to
Then set it to appropriate coordinates in transition code.