UIActionsheet锁定iPhone屏幕

时间:2009-10-27 05:36:59

标签: iphone

我是iphone的新手......我已在viewdidload中编码

-(void)viewDidload
{
     actSheet = [[UIActionSheet alloc] initWithTitle:@"How"
                    delegate:self
                        cancelButtonTitle:@"ok"                         
                                       destructiveButtonTitle:nil
                    otherButtonTitles:nil];
}

按下一个按钮时 我编码像

[actSheet showInView:self.view];

但是,屏幕已经完全像锁定,我无能为力....任何帮助?

2 个答案:

答案 0 :(得分:1)

至少,您必须在已设置为委托(self)的对象中实现UIActionSheetDelegate方法– actionSheet:clickedButtonAtIndex:。调用该方法后,工作表将自动关闭。

答案 1 :(得分:0)

你的

- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex

相关问题