【问题标题】:iphone Mail App Popup style alertviewiphone Mail App Popup 样式 alertview
【发布时间】:2012-07-03 03:10:48
【问题描述】:

我想我有一个金发碧眼的时刻。当您单击编辑-> 选择电子邮件-> 而不是单击删除时,iPhone 邮件应用程序使用的控件是什么。出现一个弹出窗口说“删除消息”或“取消”。

我只是想知道拥有“删除消息”和“取消”按钮的控件是什么?有什么想法吗?

提前致谢

【问题讨论】:

  • 是的,@KDaker 是对的,两者中的任何一个都是正确的。或者使用自定义 UIView。

标签: iphone objective-c ios xcode ipad


【解决方案1】:

您可以像这样实现自定义弹出窗口:

@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

【讨论】:

    【解决方案2】:

    UIActionSheetUIAlertView .. 我不确定你在说什么,但它必须是两者之一。

    【讨论】:

      【解决方案3】:

      UIActionSheet 是您要查找的类,显示一个非常简单,并且与 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];
      

      【讨论】:

        猜你喜欢
        • 2021-11-25
        • 1970-01-01
        • 2010-12-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-11-08
        • 2015-09-21
        相关资源
        最近更新 更多