Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何显示几乎脱离modalviewcontroller的UIButton_Ios_Objective C_Uiview_Uibutton - Fatal编程技术网

Ios 如何显示几乎脱离modalviewcontroller的UIButton

Ios 如何显示几乎脱离modalviewcontroller的UIButton,ios,objective-c,uiview,uibutton,Ios,Objective C,Uiview,Uibutton,我正在尝试创建modalviewcontroller,它应该是这样的 我的问题在于关闭按钮。正如您在本例中所看到的,它几乎是不可见的 我尝试过uiview,它有关闭按钮,使其透明,但当modalview打开时,它仍然是浅灰色的 我的代码中有一点: Settings *new = [[Settings alloc]init]; new.modalPresentationStyle = UIModalPresentationFormSheet; //i was change to o

我正在尝试创建modalviewcontroller,它应该是这样的

我的问题在于关闭按钮。正如您在本例中所看到的,它几乎是不可见的

我尝试过uiview,它有关闭按钮,使其透明,但当modalview打开时,它仍然是浅灰色的

我的代码中有一点:

Settings *new = [[Settings alloc]init];
    new.modalPresentationStyle = UIModalPresentationFormSheet;
    //i was change to other presentation styles, but that no I want.
    new.view.backgroundColor = [UIColor clearColor];
    [self presentModalViewController:new animated:YES];


    CGRect r = CGRectMake(self.view.center.x - 327,
                          self.view.center.y - 255,
                          630, 490);
    r = [self.view convertRect:r toView:new.view.superview.superview];
    new.view.superview.frame = r;
如果您仍然不明白,我需要的是模态视图的说明:


您的建议是什么,我该怎么做?

您是如何尝试添加按钮的?我在“设置”视图中将其放在同一个位置,可能存在重复。尝试在窗口上添加按钮,而不是UIViewController。。。!!!!!考虑一个新的设计。