gpt4 book ai didi

ios - 更改模式对话框 ios 的大小

转载 作者:行者123 更新时间:2023-11-29 13:15:20 25 4
gpt4 key购买 nike

如何更改模态对话框的大小?为什么这不起作用?

SlingDialogViewController *slingDialog = [[SlingDialogViewController alloc] init];

slingDialog.modalPresentationStyle = UIModalPresentationFormSheet;
slingDialog.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
slingDialog.view.superview.frame = CGRectMake(0, 0, 900, 700);
[self presentModalViewController:slingDialog animated:YES];

最佳答案

这样做:

SlingDialogViewController *slingDialog = [[SlingDialogViewController alloc] init];

slingDialog.modalPresentationStyle = UIModalPresentationFormSheet;
slingDialog.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentViewController:navController animated:YES completion:nil];

slingDialog.view.superview.frame = CGRectMake(0, 0, 900, 700);
slingDialog.view.superview.center = self.view.center;

至少根据我的经验,首先调用 presentViewController:animated:completion 很重要。

关于ios - 更改模式对话框 ios 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15970437/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com