Ios 有没有办法提高UIActionSheet的弹出速度?

Ios 有没有办法提高UIActionSheet的弹出速度?,ios,objective-c,uiactionsheet,Ios,Objective C,Uiactionsheet,我在程序中使用了一个简单的UIActionSheet: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Miao" delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"opt 1",

我在程序中使用了一个简单的UIActionSheet:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Miao" delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:
                            @"opt 1",
                            @"opt 2",
                            @"opt 3",
                            @"opt 4",
                            @"opt 5",
                            @"opt 6",
                            @"opt 7",
                            @"opt 8",
                            @"opt 9",
                            nil];


actionSheet.delegate=self;

并使用:[actionSheet showInView:self.view]显示视图;想知道是否有办法提高弹出窗口的速度?这并不是因为它的滞后,我只是希望它更快。我在网上到处找了找,什么也找不到。如有任何建议,将不胜感激。感谢

UIActionSheet可以通过多种方式显示。有两种方法允许您直接操纵弹出式动画是否应设置动画:

- (void)showFromRect:(CGRect)rect inView:(UIView *)view animated:(BOOL)animated
或对iPad感兴趣:

- (void)showFromBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated

请记住,-@bamswold已经说过-UIActionSheet在iOS8中已被弃用,您应该改用UIAlertController。

我在其文档中找不到与此相关的任何内容。也许你应该考虑创建自己的动画与警报。是的,似乎这是唯一的方式…谢天谢地,我还没有,但你有没有试着将它包装到视图动画块中?iOS 8中不推荐使用UIActionSheet。请注意,UIActionSheetDelegate也不推荐使用。但是,您可能希望尝试-showFromRect:inView:animated:,并为animated属性传递NO,并自行设置动画,因为它是UIView的子类