Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/120.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIActionSheet没有';不出现_Ios_Uiactionsheet - Fatal编程技术网

Ios UIActionSheet没有';不出现

Ios UIActionSheet没有';不出现,ios,uiactionsheet,Ios,Uiactionsheet,我尝试在UIViewController内创建UIActionSheet,如下所示: discardAS = [[UIActionSheet alloc] initWithTitle:"title" delegate:self cancelButtonTitle:"Cancel" destructiveButtonTitle:"Discard" otherButtonTitles:nil]; discardAS.actionSheetStyle = UIActionSheetStyleDefa

我尝试在UIViewController内创建UIActionSheet,如下所示:

discardAS = [[UIActionSheet alloc] initWithTitle:"title" delegate:self cancelButtonTitle:"Cancel" destructiveButtonTitle:"Discard" otherButtonTitles:nil];

discardAS.actionSheetStyle = UIActionSheetStyleDefault;
[discardAS showInView:[self view]];
当我唤起它-整个屏幕“暗淡”(好像行动表实际上在前台)-但我没有看到行动表。它似乎显示“屏幕外”

当我在iOS7上尝试这一点时,我可以看到一个白色的框向上射出,很快就离开了屏幕——就像操作表被放在屏幕顶部一样。当我点击窗口时,模糊消失了,一切都很正常——就像iOS7一样,如果你点击操作表,它就消失了

因此,我的结论是,这张行动单是关于(并且超出)屏幕范围的

我在控制台上也看到了以下内容

 Presenting action sheet clipped by its superview. Some controls might not respond to touches. On iPhone try -[UIActionSheet showFromTabBar:] or -[UIActionSheet showFromToolbar:] instead of -[UIActionSheet showInView:].
这两个我都试过了,结果都一样。显示self.view.frame会显示一个大约为0,0300200的矩形,因此它的尺寸不会太大


你知道为什么,或者如何修复/调试吗?

为了子孙后代——答案是我的继承人中有一个“额外的视图控制器”——如下所述:

试着注释第二行