我正在尝试将视图添加到 ActionSheet 中,但尺寸都搞砸了。
视图出现了,但是当它没有以正确的大小显示时。我将视图宽度设置为 300,高度设置为 411。
当我使用代码将其添加到操作表时:
ContactCardViewController* myController = [[ContactCardViewController alloc] initWithNibAndEmployeeInfo:[self.request objectForKey:@"Requestor"]];
[self.actionSheet showInView:self.view];
[self.actionSheet setBounds:[myController.view frame]];
[self.actionSheet addSubview:myController.view];
View 只显示了一半左右,右边被稍微切掉了,看起来和 superview 的大小差不多,应该小很多。
我该如何解决?
谢谢!