当前位置: 动力学知识库 > 问答 > 编程问答 >

iphone - 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];
}
分享给朋友:
您可能感兴趣的文章:
随机阅读: