Reputation: 2863
Im having a blonde moment i think. What is the control the the iPhone Mail app uses when you click Edit -> select an email -> than click delete. A popup comes up saying "Delete Message" or "Cancel".
Im just wondering what is the control that holds the "Delete Message" and "Cancel" buttons? Any ideas?
Thanks in advance
Upvotes: 0
Views: 240
Reputation: 1500
You can implement custom popup like this:
@implementation UIView(Animation)
-(void)animationElasticPopup {
self.transform = CGAffineTransformMakeScale(0.001f, 0.001f);
[UIView animateWithDuration:0.4 animations:^{
[UIView setAnimationDelay:0];
self.transform = CGAffineTransformMakeScale(1.1f, 1.1f);//1.1
self.alpha = 1.f;
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.1 animations:^{
self.transform = CGAffineTransformMakeScale(0.9f, 0.9f);//0.9
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.1 animations:^{
self.transform = CGAffineTransformMakeScale(1.f, 1.f);//1.0
} completion:^(BOOL finished) {
}];
}];
}];}
@end
Upvotes: 2
Reputation: 20993
UIActionSheet
is the class you are looking for, it is very simple to display one and works a lot like UIAlertView.
UIActionSheet *confirmationSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure you want to cancel?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete" otherButtonTitles:@"Save Draft", nil]
[confirmationSheet showFromToolbar:self.myToolbar];
Upvotes: 0
Reputation: 5909
UIActionSheet
or UIAlertView
.. I'm not sure what you are talking about but it has to be one of the two.
Upvotes: 1