通常我会像下面这样初始化一个 UAModalPanel,它会工作正常
modalPanel = [[[UAExampleModalPanel alloc] initWithFrame:self.view.bounds withView:@"modalPanel_iPhone"] autorelease];
[self.view addSubview:modalPanel];
modalPanel.delegate = self;
[modalPanel showFromPoint:modalPanel.view.center];
但是如果我尝试将第一行更改为下面,我无法单击 X 按钮关闭 subview 。我做错了什么?
modalPanel = [[[UAExampleModalPanel alloc] initWithFrame:CGRectMake(10,10,100,100) withView:@"modalPanel_iPhone"] autorelease];
最佳答案
我是 UAModalPanel 的作者.您始终使用窗口的全尺寸框架初始化面板,因此深色 mask 可以达到全屏。然后,如果你想调整面板大小,你可以调整面板的边距和填充,如 Step 4 in the ReadMe 所示。在 Github 页面上。
关于ios - 如何自定义UAModalPanel的大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16227537/