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 *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?
精彩评论