【发布时间】:2014-12-12 07:36:40
【问题描述】:
我试图在另一个模态视图上呈现一个透明的模态视图。我正在使用故事板。
我已将此添加到我的第一个模态视图中:
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self performSegueWithIdentifier:@"sendUserMessage" sender:self];
这是我的第二个模态视图(我想出现在第一个模态视图上,第一个在背景中透明)
// Make the main view's background clear, the second view's background transparent.
self.view.backgroundColor = [UIColor clearColor];
UIView* backView = [[UIView alloc] initWithFrame:self.view.frame];
backView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6];
[self.view addSubview:backView];
但我似乎无法与我的 UI 进行交互,并且后屏幕在完全加载后变黑(虽然一开始是透明的)。
我认为这是因为我是从另一个模态视图中进行的?
【问题讨论】:
标签: ios objective-c modalviewcontroller