开发者

How to get UINavigationController child view

开发者 https://www.devze.com 2023-01-15 16:02 出处:网络
I have one detail view controller in splitView - SearchDeatilViewController. But that view controller is attached to navigation controller.

I have one detail view controller in splitView - SearchDeatilViewController. But that view controller is attached to navigation controller. How can I get that su开发者_如何学Pythonbview to take controll of him?

I tried like this, to reload sub view tableView:

SearchDetailViewController *detail1 = (SearchDetailViewController *)[self.viewControllers objectAtIndex:1];
[detail1.tableView reloadData];

But it gives me error:

-[UINavigationController reloadTable]: unrecognized selector sent to instance

It seems that the object I get in variable detail1 is of type navigationController. Obviously I need to go one level deeper. How can I do that?

Thanks


I found a solution. Just tagged subviews and than access them with [myView viewWithTag:X] and it works.

0

精彩评论

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