开发者

How do I stack subviews on iOS?

开发者 https://www.devze.com 2023-02-14 10:04 出处:网络
I have a graph view that I would like to overlay some buttons on. When I create a nib with buttons and add that as a subview after adding the graph, it just shows the buttons over a white screen.

I have a graph view that I would like to overlay some buttons on. When I create a nib with buttons and add that as a subview after adding the graph, it just shows the buttons over a white screen.

GraphViewController *gra开发者_开发百科phViewController = [[GraphViewController alloc] init];
[self.view addSubview:graphViewController.view];
GraphButtonViewController *graphButtonViewController = [[GraphButtonViewController alloc] initWithNibName:@"GraphButtonView" bundle:nil];
[self.view addSubview:graphButtonViewController.view];


Did you try making your GraphButtonView xib have a transparent background for it's (main) view?

0

精彩评论

暂无评论...
验证码 换一张
取 消