简体   繁体   中英

How do I stack subviews on iOS?

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 *graphViewController = [[GraphViewController alloc] init];
[self.view addSubview:graphViewController.view];
GraphButtonViewController *graphButtonViewController = [[GraphButtonViewController alloc] initWithNibName:@"GraphButtonView" bundle:nil];
[self.view addSubview:graphButtonViewController.view];

您是否尝试过使GraphButtonView xib的(主)视图具有透明背景?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM