2009-10-27 101 views
0

我新的iphone ...我已经编码的viewDidLoad中UIActionsheet锁iPhone屏幕

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

当按下一个按键, 我编码方式类似于

[actSheet showInView:self.view]; 

但是,画面充满像锁着,我什么也做不了.... anyhelpplease?

+1

由于在UIActionSheet接管并隐藏您的应用程序(这是预期的行为)或被锁定,屏幕被锁定,因为在工作表中显示,但不响应用户输入?此外,您在那里的代码将显示一张没有标题的表格,并且没有按钮......这不是一件非常有用的事情! – 2009-10-27 05:53:35

+0

我已插入标题,确定按钮也....... 如果我使用showInView:self.view在viewwillappear,它工作正常。但 如果我使用IBAction按钮,它看起来像那样.....先生... – 2009-10-27 06:00:42

回答

0

哪里是你的

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

1

至少您必须在您设置为委托(self)的对象中实现UIActionSheetDelegate方法– actionSheet:clickedButtonAtIndex:。该方法被调用后,该表会自动解除。