i have used container view on the right side and i used another view controller as a child view controller to this container view. i want to change the data appearing in that container view. FYI i m loading the EKEventViewController
in that container view. So obviously the tableview contains the events from the calendar. I've seen many tutorials but i m unable to change the content in the container view. Any help is appreciated.
here is some of the code i used.
in contentVC since i use tableview, i wrote the code in didSelectRowAtIndexPath:
method
[self.view addSubView:containerView];
[self addChildController:eventViewController]; //which is the childcontroller of containerview
and in eventViewController class viewDidLoad:
method
i assigned EKEventViewController Object as a childcontroller of the container view object since i want the UI of EKEventViewController in the containerview.
Simply EKEventViewController (Childcontroller of) eventViewController (childcontroller of) ContainerView. Any help is appreciated
problem solved guys. thanks for the responce @JoeBlow, just a silly thing i forgot after a lot of research. i'm not using the segues
How to add a subview that has its own UIViewController in Objective-C?
Your
viewDidLoad:
method is not the one to call. You should be adapting the:
viewWillAppear:
method instead.
The viewWillAppear occurs after the viewDidLoad is already finished. Try adding the correct view there.
来源:https://stackoverflow.com/questions/25664299/using-container-view-as-a-dashboard