我有一个UIViewController
嵌入UINavigationController
。我想提出这个viewController
并在呈现之后我还需要导航方法(Push& Pop),所以我提交的是UINavigationController
而不是UIViewController
,但为此,我需要将自定义数据传递给我ViewController
之前无法访问之前ViewController
的{{1}}表单。
这是我的代码。
ViewController
P.S当我从Storyboard设计导航控制器时,我无法
UINavigationController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"MyNavigationIdentity"]]; [self presentViewController:navigationController animated:YES completion:nil];
和alloc
新init
。
答案 0 :(得分:4)
您只需使用ViewController
属性
UINavigationController
childViewControllers
内嵌的NSArray *viewControllers = [navigationController childViewControllers];
if (viewControllers.count > 0) {
UIViewController *myViewController = (UIViewController *)[viewControllers firstObject];
}
即可
environments {
development {
grails {
mail {
host = "smtp.gmail.com"
port = 465
username = "xxxxx@xxxxxx"
password = jasypt
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"465",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
}
}
}
production {
grails.logging.jul.usebridge = false
}
答案 1 :(得分:4)
您可以从viewController
的{{1}}媒体资源中访问viewControllers
。
UINavigationController