开发者

Xcode problem - add view to parent

I'm new to Xcode and Objective C coding, and I already have a little problem. So I have a mainview with a button. When I press the button a table is showing. (the table is another tableViewController) When I press an item on the table, There should be shown another view (on my main window). I know when you try to add a subview you use it like this:

[self.view addSubview:thisistheController.view];

But when I use 开发者_StackOverflow中文版the table, the new view is shown in the table and not on my mainview but on my table. like this:

Xcode problem - add view to parent

When I try this:

[MainviewController.view addSubview:thisistheController.view];

i don't get any errors, or warnings. but the view isn't shown on my main window. I also tried to use:

[self.parentController.view addSubview:thisistheController.view];

But here I get the same problem.


try...

[self.view.superview addSubview:thisisthecontroller.view]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜