Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.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
Cocoa touch UIActionSheet在横向和纵向上的位置_Cocoa Touch_Uikit_Ipad_Orientation_Uiactionsheet - Fatal编程技术网

Cocoa touch UIActionSheet在横向和纵向上的位置

Cocoa touch UIActionSheet在横向和纵向上的位置,cocoa-touch,uikit,ipad,orientation,uiactionsheet,Cocoa Touch,Uikit,Ipad,Orientation,Uiactionsheet,在横向模式下打开UIActionSheet时,它的定位未居中。如果我设置边界或更改帧。作为子视图的UIActionSheet中的内容会发生变化,但实际的工作表仍保留在相同的位置,这看起来非常尴尬 我如何将uiActuaPress连同它的子视图移动到屏幕的中心? 你可以使用下面的代码,这样你就可以把uuActuaPin放到你想要的屏幕中间。p> UIActionSheet *actionsheet1 = [[UIActionSheet alloc]initWithTitle:@"O

在横向模式下打开UIActionSheet时,它的定位未居中。如果我设置边界或更改帧。作为子视图的UIActionSheet中的内容会发生变化,但实际的工作表仍保留在相同的位置,这看起来非常尴尬


<>我如何将uiActuaPress连同它的子视图移动到屏幕的中心?

你可以使用下面的代码,这样你就可以把uuActuaPin放到你想要的屏幕中间。p>
        UIActionSheet *actionsheet1 = [[UIActionSheet alloc]initWithTitle:@"Options" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Contacts", @"Employees",nil];
        actionsheet1.tag = 1;
        [actionsheet1 showInView:self.view];
        [actionsheet1 setActionSheetStyle:UIActionSheetStyleBlackOpaque];
        [actionsheet1 release]; 

请检查这段代码,如果你还有问题,让我看一下。

你可以使用下面的代码,这样你就可以把他的UI表放在屏幕的中间。p>
        UIActionSheet *actionsheet1 = [[UIActionSheet alloc]initWithTitle:@"Options" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Contacts", @"Employees",nil];
        actionsheet1.tag = 1;
        [actionsheet1 showInView:self.view];
        [actionsheet1 setActionSheetStyle:UIActionSheetStyleBlackOpaque];
        [actionsheet1 release]; 

请检查此代码,如果您还有任何问题,请告诉我。

我最终使用UIAlertView将我的内容作为子视图添加到警报视图。我最终使用UIAlertView将我的内容作为子视图添加到警报视图。