我正在使用这种方法来尝试获取UIScrollView
我的一个类中的属性:
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
UINavigationController *nav = delegate.frontViewController.navigationController;
for (UIViewController *controller in nav.viewControllers) {
if ([controller isKindOfClass:[SGInitialViewController class]]) {
SGInitialViewController *sgInitialController = (SGInitialViewController *)controller;
SGPlotViewController *plotVC = [sgInitialController.childViewControllers objectAtIndex:0];
[plotVC.scrollViewMain setUserInteractionEnabled:NO];
}
该类SGInitialViewController
当前已加载,并且childViewController
SGPlotViewController
已加载并且也在屏幕上。无论我多么努力,我都无法改变它的属性。关于我做错了什么的任何想法?