Hi,
I display a modal View with a transparent background.
this is my code.
PHP Code:
if (!mv) {
mv=[[MvPersonsViewContoller alloc] init];
}
CGRect frame = mv.view.frame;
frame.origin.y=20;
mv.view.frame=frame;
[[[self tabBarController] view] addSubview:mv.view];
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setType:kCATransitionMoveIn];
[animation setSubtype:kCATransitionFromTop];
[animation setDuration:0.75];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
[[mv.view layer] addAnimation:animation forKey:kCATransition];
This subview contains a datePicker with a "Done" button, and I would like to
back to the main view when the user taps on the button.
I mean, I need to remove the subview and get the selected date.
I read some posts about protocol, but I have no clue how to implement it.
Also, I have 2 questions about this "modal popup".
My app uses a tabBarController and a NavigationController.
If I don't use this line
frame.origin.y=20;
when the popup appears, the tabBarController legends "overlay" the popup background.
The other question, is about to hide the "popup" when the user will tap on the button.....
How could I have the same animation to hide the popup (from top to bottom).
I thank you in advance for your help.
Stan