[英]adding a view's to an existing subview
I have a delegate which basically adds a view controller's view to this view's as a subview. 我有一个委托,它基本上将视图控制器的视图添加为该视图的子视图。 The issue is that the background of the subview is always gray. 问题是子视图的背景始终为灰色。 I've set it so that the color is clear. 我已对其进行设置,以使颜色清晰。 Any idea why? 知道为什么吗? I want it to be see through. 我希望它能被看到。
- (void)fullStryViewController:(FullStryViewController *)fullStoryVC addFullScreenSubView:(UIViewController *) viewController
{
[self.view addSubview:viewController.view];
}
May be you can try this way ?, 也许您可以尝试这种方式?,
- (void)fullStryViewController:(FullStryViewController *)fullStoryVC addFullScreenSubView:(UIViewController *) viewController
{
viewController.view.backgroundColor = [UIColor clearColor];
[self.view addSubview:viewController.view];
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.