ios - 如何自定义UAModalPanel的大小?

标签 ios uiviewcontroller

通常我会像下面这样初始化一个 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/

相关文章:

iphone - 我无法使用 GDataXML 解析 xml 数据

objective-c - 没有显式声明的属性 ivars 会生成哪些名称?

iphone - CIFaceFeature 的坐标系

ios - ContainerView childViewControlllers View 框架占据整个屏幕

iphone - “试图弹出一个不存在的 View Controller 。”

c# - Xamarin IOS 在 xamarin 上导航到另一个没有按钮的 View Controller

ios - UIViewController 扩展不允许覆盖 Swift 中的 View 相关功能?