iphone – 请求在非结构或联合的东西中查看成员

我构建我的应用程序
iphone时出现此错误:

请求[CommuneSlider.view removeFromSuperview]中的结构或联合的成员查看;

代码:
– (void)CommuneSelected {

CommuneDetailsViewController *com = [[CommuneDetailsViewController alloc] initWithNibName:@"CommuneDetailsViewController" bundle:nil];

UINavigationController *navig = [[UINavigationController alloc] 
                               initWithRootViewController:com];
[self setCommuneDetails:(CommuneDetailsViewController *) navig];
[navig setNavigationBarHidden:YES];
[com release];
[navig release];


[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:.8];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:window cache:YES];

[CommuneSlider.view removeFromSuperview];
[self.window addSubview:[CommuneDetails view]];

[UIView commitAnimations];

}

需要帮忙

最佳答案 如果这是错误行:

请求[CommuneSlider.view removeFromSuperview]中的结构或联合的成员查看;

它似乎表明CommuneSlider没有“视图”成员.变量的名称让我觉得它是一个UIControl,而不是UIViewController的子类(它有一个view属性).

你确定你不想要这样的东西:

[CommuneSliderController.view removeFromSuperview];
点赞