if([[segue identifier] isEqualToString:@"dischargeSegue"])
{
UITabBarController *dc = [segue destinationViewController];
dischargeView *discharge = (dischargeView *)[[dc.viewControllers objectAtIndex:0] objectAtIndex:0];
discharge.delegate = self;
}
我正在尝试为标签视图控制器的初始视图设置委托。这是我尝试的,但得到以下错误:无法识别的选择器发送到实例
答案 0 :(得分:0)
使用 -
dischargeView *discharge = (dischargeView *)[[[dc.viewControllers objectAtIndex:0] viewControllers] objectAtIndex:0];