点击行的tableView
问题描述:
我didSelectRowAtIndexPath方法后添加在上海华新观点:点击行的tableView
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES];
[self.view removeFromSuperview];
[self.view.superview addSubview:commentsViewController.view];
[UIView commitAnimations]; }
我说我CommentsViewController类为根.h文件中。 commentsViewController是这个类的变量。点击我的超级视图后消失,但未插入新视图。在我的问题?
答
要调用self.view removeFromSuperView,之后propably因为你从上海华盈删除它,你不必引用超级看法,你必须先调用上海华addSubView和self.view后删除的SuperView
其实我不需要从超级角度去除某些东西,这是我的错误。问题是将新视图插入超视图。 – RomanHouse 2012-03-25 21:38:40