开发者

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?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜