Ios 如何显示几乎脱离modalviewcontroller的UIButton
我正在尝试创建modalviewcontroller,它应该是这样的 我的问题在于关闭按钮。正如您在本例中所看到的,它几乎是不可见的 我尝试过uiview,它有关闭按钮,使其透明,但当modalview打开时,它仍然是浅灰色的 我的代码中有一点: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
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。。。!!!!!考虑一个新的设计。