Cocoa touch UIActionSheet在横向和纵向上的位置
在横向模式下打开UIActionSheet时,它的定位未居中。如果我设置边界或更改帧。作为子视图的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
<>我如何将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将我的内容作为子视图添加到警报视图。