我有一个UIActionSheet如下:
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat: @"Cancel New %@? Changes will be lost.", [creator propertyName]] delegate:self cancelButtonTitle:@"Stay Here" destructiveButtonTitle:@"Discard and Close" otherButtonTitles:@"Save and Close", nil];
[sheet showInView:self.view];
[sheet release];
创建操作表,按钮显示,破坏性按钮位于顶部,取消按钮位于底部,其他按钮(保存并关闭)显示在中间,
前两个按钮(破坏性和其他)工作正常,但底部按钮有一个间隙,因此它比其他按钮更低。出于某种原因,为了按下按钮,我需要触摸没有间隙的地方。触摸实际按钮不起作用。
对不起,如果这不是很清楚,有没有人遇到过这样的事情?我不喜欢把“我发现了一个错误”的卡片扯得太快,也许我在这里做错了。
答案 0 :(得分:4)
您可能正在标签栏控制器中的视图中显示操作表。
操作表显示在标签栏上方,但触摸不会在标签栏占用的区域中注册。
尝试使用
[sheet showFromTabBar:self.tabBarController.tabBar];