I got viewcontroller with navigation bar. I move from it to another VC with pushViewcontroller.

Destination viewController has view with data writing in code. My navigation controller is closes part of my view. How can I shift my view's data bellow inserting navigation VC?

有帮助吗?

解决方案

I would use (void)prepareforSegue

First create a property in your next view controller, for this example I'm calling it ViewData.

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{

if ([segue.identifier isEqualToString:@"Your Identifier])
{

YourNextViewController *vc = (YourNextViewController*)segue.destinationViewController;
  [vc setViewData: @"Whatever data"];

}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top